Skip to content

Commit

Permalink
Merge branch 'archetype-plugin-321-bug' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMosigItemis committed Jan 10, 2025
2 parents fb9780d + 8897f09 commit 70bea07
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 150 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,19 @@ Contains defaults for often used maven properties and common test dependencies,

The latest release version always tries to include the latest versions of all used dependencies and plugins.

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.
Projects created with this archetype will also contain reasonable default configuration for your favorite IDE. Have a look at the directory `ide_setup` for details.

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

`mvn clean install`

### Maven < 3.5.0
When building with older Maven versions (looking at you, 3.3.9), make sure to activate the corresponding profile:

`mvn clean install -Pmvn33`

This is required, because Maven switched from Eclipse Aether to Maven Artifact Resolver since 3.5.0.

## Usage
Generate a new project with this command:
`mvn archetype:generate -B -DarchetypeGroupId=com.itemis -DarchetypeArtifactId=fluffyj.archetype -DarchetypeVersion=1.19.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`.

Build the created project with `mvn clean install`.
## 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
42 changes: 23 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
<packaging>maven-archetype</packaging>

<name>Fluffy J Archetype</name>
<description>An improved variety of a Maven Java project archetype. Extra fluffy ❤</description>
<description>An improved variety of a Maven Java project archetype. Extra
fluffy ❤</description>

<licenses>
<license>
Expand Down Expand Up @@ -48,11 +49,12 @@
</scm>

<properties>
<java.version>17</java.version>
<java.version>21</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>
<version.maven-archetype-plugin>3.2.0</version.maven-archetype-plugin>
<version.maven-archetype-plugin>3.3.1</version.maven-archetype-plugin>
<version.maven-deploy-plugin>3.1.3</version.maven-deploy-plugin>
<version.replacer-plugin>1.5.3</version.replacer-plugin>
<build.timestamp.formatted>${maven.build.timestamp}</build.timestamp.formatted>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm.ssZ</maven.build.timestamp.format>
Expand All @@ -75,15 +77,23 @@
<plugin>
<artifactId>maven-clean-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.maven-deploy-plugin}</version>
</plugin>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<configuration>
<useDefaultExcludes>false</useDefaultExcludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<propertiesEncoding>UTF-8</propertiesEncoding>
<!-- See https://issues.apache.org/jira/browse/MRESOURCES-190?focusedCommentId=15182734&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15182734 -->
<!-- See
https://issues.apache.org/jira/browse/MRESOURCES-190?focusedCommentId=15182734&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15182734 -->
<addDefaultExcludes>false</addDefaultExcludes>
</configuration>
</plugin>
Expand All @@ -104,7 +114,8 @@
</executions>
<configuration>
<delimiters>@</delimiters>
<file>${project.build.testOutputDirectory}/projects/it-basic/goal.txt</file>
<file>
${project.build.testOutputDirectory}/projects/it-basic/goal.txt</file>
<replacements>
<replacement>
<token>fluffy.profiles</token>
Expand All @@ -114,20 +125,13 @@
</configuration>
</plugin>
</plugins>

<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
</build>

<profiles>
<!-- Use this profile when building with Maven <= 3.5.0 due to switch
from Eclipse Aether to Maven Artifact Resolver -->
<!-- See https://jaxenter.com/apache-maven-3-5-0-nothing-see-3-4-0-move-along-133180.html -->
<profile>
<id>mvn33</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<fluffy.profiles>-Pmvn33</fluffy.profiles>
</properties>
</profile>
</profiles>
</project>
38 changes: 0 additions & 38 deletions src/main/resources/META-INF/archetype-post-generate.groovy

This file was deleted.

4 changes: 1 addition & 3 deletions src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<fileSet filtered="true" encoding="UTF-8">
<directory></directory>
<includes>
<!-- Adding .gitignore is currently broken: https://issues.apache.org/jira/projects/ARCHETYPE/issues/ARCHETYPE-505 -->
<!-- Thus, it will be renamed to .gitignore via META-INF/archetype-post-generate.groovy -->
<include>gitignore</include>
<include>.gitignore</include>
<include>.editorconfig</include>
<include>README.md</include>
<include>spotbugs-exclude.xml</include>
Expand Down
Loading

0 comments on commit 70bea07

Please sign in to comment.