Skip to content

Commit

Permalink
Upgrade libraries to support Java 21 (#59)
Browse files Browse the repository at this point in the history
* Upgrade libraries to support Java 21

* arch-unit-build-plugin-core 4.0.0

* building with java 21

---------

Co-authored-by: seb <[email protected]>
Co-authored-by: Vincent Fuchs <[email protected]>
  • Loading branch information
3 people authored Nov 17, 2023
1 parent b5fb077 commit 9a7cf6e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 43 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 21
- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | base64 --decode | gpg --batch --import
gpg --refresh-keys --keyserver keyserver.ubuntu.com
gpg --list-secret-keys --keyid-format LONG
gpg --list-secret-keys --keyid-format LONG
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '21'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
Expand Down
92 changes: 53 additions & 39 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
<groupId>com.societegenerale.commons</groupId>
<artifactId>arch-unit-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>3.0.0-SNAPSHOT</version>

<version>4.0.0-SNAPSHOT</version>
<name>ArchUnit Maven plugin</name>

<description>An easy way to distribute ArchUnit rules across projects</description>
<url>https://github.com/societe-generale/arch-unit-maven-plugin</url>

Expand All @@ -23,13 +21,13 @@
<name>Vincent Fuchs</name>
<email>[email protected]</email>
</developer>

<developer>
<id>FanJups</id>
<name>Fanon Jupkwo</name>
<email>[email protected]</email>
</developer>

</developers>

<licenses>
Expand All @@ -43,19 +41,34 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<java.version>11</java.version>

<maven.core.version>3.5.0</maven.core.version>
<maven.plugin.annotation.version>3.5</maven.plugin.annotation.version>

<lombok.version>1.18.24</lombok.version>
<jacoco.version>0.8.8</jacoco.version>
<mockito.version>3.1.0</mockito.version>
<jaxb.version>2.3.3</jaxb.version>

<arch-unit-build-plugin-core.version>3.0.0</arch-unit-build-plugin-core.version>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<arch-unit-build-plugin-core.version>4.0.0</arch-unit-build-plugin-core.version>
<junit4.version>2.10</junit4.version>
<maven.core.version>3.9.3</maven.core.version>
<maven.plugin.annotation.version>3.9.0</maven.plugin.annotation.version>
<maven-plugin-testing.version>3.3.0</maven-plugin-testing.version>
<mockito.version>5.4.0</mockito.version>
<assertj.version>3.24.2</assertj.version>
<powermock.version>2.0.9</powermock.version>
<bind-api.version>4.0.1</bind-api.version>
<jaxb.version>4.0.2</jaxb.version>

<jaxb2.version>3.1.0</jaxb2.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<maven-plugin-plugin.version>3.9.0</maven-plugin-plugin.version>
<jacoco.version>0.8.10</jacoco.version>
<coveralls.version>4.3.0</coveralls.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>

<project.testresult.directory>${project.build.directory}/test-results</project.testresult.directory>
<generated.test.source.directory>${project.basedir}/target/generated-test-sources/test-annotations</generated.test.source.directory>
Expand Down Expand Up @@ -107,7 +120,7 @@
<dependency>
<groupId>com.tngtech.junit.dataprovider</groupId>
<artifactId>junit4-dataprovider</artifactId>
<version>2.4</version>
<version>${junit4.version}</version>
<scope>test</scope>
</dependency>

Expand All @@ -127,7 +140,7 @@
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<version>${maven-plugin-testing.version}</version>
<scope>test</scope>
</dependency>

Expand All @@ -147,14 +160,14 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.9.1</version>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.7.3</version>
<version>${powermock.version}</version>
<!-- Need to add powerMock as a dependency WITHOUT test scope. This way, we're sure the Powermock classes are part of the plugin, and will be found
by the plugin at runtime in different projects. Without it, NoPowerMockRuleTest actually won't work !
see https://github.com/TNG/ArchUnit/issues/120
Expand All @@ -165,24 +178,24 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
<version>${bind-api.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${jaxb.version}</version>
<scope>compile</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.5.0</version>
<version>${jaxb2.version}</version>
<executions>
<execution>
<id>testXjc</id>
Expand Down Expand Up @@ -213,7 +226,7 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb.version}</version>
<version>${bind-api.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand All @@ -228,7 +241,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand Down Expand Up @@ -260,7 +273,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<!-- Sets the VM argument line used when unit tests are run. -->
<argLine>${surefireArgLine}</argLine>
Expand All @@ -273,12 +286,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>${maven-deploy-plugin.version}</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
Expand All @@ -287,18 +301,19 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>${maven-release-plugin.version}</version>
<configuration>
<stagingRepository>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</stagingRepository>
<tagNameFormat>archUnit_maven_plugin_@{project.version}</tagNameFormat>
Expand All @@ -310,10 +325,11 @@
<mavenExecutorId>forked-path</mavenExecutorId>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>arch-unit</goalPrefix>
</configuration>
Expand Down Expand Up @@ -352,23 +368,21 @@
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<version>${coveralls.version}</version>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>makeRelease</id>

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -382,7 +396,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
Expand All @@ -399,7 +413,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down

0 comments on commit 9a7cf6e

Please sign in to comment.