Skip to content

Commit

Permalink
Bumped archetype test project dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMosigItemis committed Nov 17, 2023
1 parent eacc58a commit 9fbd1df
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 40 deletions.
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The latest release version always tries to include the latest versions of all us
Projects created with this archetype will also contain reasonable default configuration for your favorit IDE. Have a look at the directory `ide_setup` for details.

## Build
Note: JDK >=11 is required for the build.
Note: JDK >=17 is required for the build.

`mvn clean install`

Expand All @@ -24,27 +24,6 @@ Generate a new project with this command:
`mvn archetype:generate -B -DarchetypeGroupId=com.itemis -DarchetypeArtifactId=fluffyj.archetype -DarchetypeVersion=1.17.0-SNAPSHOT -DgroupId=de.my.groupid -DartifactId=de.my.groupid.artifactid -Dversion=1.0.0-SNAPSHOT -Dpackage=de.my.groupid.artifactid`

Build the created project with `mvn clean install`. When building with Maven < 3.5.0, you need to activate the appropriate profile: `mvn clean install -Pmvn33`.

### Note on usage with Java >=16
When running Maven with Java >16 make sure to use archetype plugin version >=3.2.0. You can force the version by calling Maven like this:

`mvn org.apache.maven.plugins:maven-archetype-plugin:3.2.0:generate ...`

Background: The fluffy archetype is using a post generation script based on Groovy. Java 16 is the first Java version not permitting old Groovy versions to do any reflection without providing a proper module configuration. If you use an old archetype plugin version (e. g. 3.0.1), you are also going to use an old Groovy version. This will result in an error like this:

`
Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module
`

Until Java 16 this used to be:
`[INFO] Executing META-INF/archetype-post-generate.groovy post-generation script
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass$3$1 (file:/C:/Users/itsme/.m2/repository/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass$3$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release`

In order to prevent this, an up to date Groovy version must be used, which is only the case with up to date versions of the archetype plugin.

## Development
The latest snapshot lives on the `develop` branch. The latest release lives on the `main` branch. A tag will be created for every release.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<properties>
<java.version>17</java.version>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<version.maven-archetype-plugin>3.2.0</version.maven-archetype-plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<pluginExecutionFilter>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<versionRange>4.7.3.0</versionRange>
<versionRange>4.8.1.0</versionRange>
<goals>
<goal>check</goal>
</goals>
Expand Down
32 changes: 16 additions & 16 deletions src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<url>project.website</url>

<properties>
<java.version>11</java.version>
<maven.compiler.release>11</maven.compiler.release>
<java.version>17</java.version>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<build.timestamp.formatted>${maven.build.timestamp}</build.timestamp.formatted>
Expand All @@ -61,30 +61,30 @@
<resource.delimiter>${*}</resource.delimiter>
<!-- Only required for java < 9 <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> -->
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>3.2.2</maven-failsafe-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
<maven-clean-plugin.version>3.3.1</maven-clean-plugin.version>
<maven-clean-plugin.version>3.3.2</maven-clean-plugin.version>
<maven-shade-plugin.version>3.5.1</maven-shade-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-exec-plugin.version>3.1.0</maven-exec-plugin.version>
<maven-exec-plugin.version>3.1.1</maven-exec-plugin.version>
<maven-help-plugin.version>3.4.0</maven-help-plugin.version>
<maven-install-plugin.version>3.1.1</maven-install-plugin.version>
<guava.version>32.1.2-jre</guava.version>
<mockito.version>5.5.0</mockito.version>
<guava.version>32.1.3-jre</guava.version>
<mockito.version>5.7.0</mockito.version>
<hamcrest.version>2.2</hamcrest.version>
<spotbugs.plugin.version>4.7.3.6</spotbugs.plugin.version>
<spotbugs.version>4.7.3</spotbugs.version>
<junit.version>5.10.0</junit.version>
<jacoco.plugin.version>0.8.10</jacoco.plugin.version>
<git-commit-id-plugin.version>6.0.0</git-commit-id-plugin.version>
<spotbugs.plugin.version>4.8.1.0</spotbugs.plugin.version>
<spotbugs.version>4.8.1</spotbugs.version>
<junit.version>5.10.1</junit.version>
<jacoco.plugin.version>0.8.11</jacoco.plugin.version>
<git-commit-id-plugin.version>7.0.0</git-commit-id-plugin.version>
<assertj.version>3.24.2</assertj.version>
<logback.version>1.4.11</logback.version>
<equalsverifier.version>3.15.2</equalsverifier.version>
<equalsverifier.version>3.15.3</equalsverifier.version>
<awaitility.version>4.2.0</awaitility.version>
<wiremock.version>3.2.0</wiremock.version>
<arch.unit.version>1.1.0</arch.unit.version>
<wiremock.version>3.3.1</wiremock.version>
<arch.unit.version>1.2.0</arch.unit.version>
<!-- Disable class data sharing (CDS) to avoid a nasty JVM warning. -->
<!-- This usually has only a very small impact on performance and
memory usage. -->
Expand Down

0 comments on commit 9fbd1df

Please sign in to comment.