Skip to content

Commit

Permalink
Group all dependencies in the parent pom.xml
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Mesnil <jmesnil@redhat.com>
  • Loading branch information
jmesnil committed Aug 17, 2023
1 parent 8788c92 commit 92a27bd
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 108 deletions.
15 changes: 0 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,6 @@ version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: maven
directory: "/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: maven
directory: "/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/"
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: maven
directory: "/wildfly-subsystem-archetype/src/main/resources/archetype-resources/"
schedule:
interval: weekly
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Determine Archetype & WildFly versions
run: |-
ARCHETYPE_VERSION=$(mvn -B help:evaluate -Dexpression=project.version -DforceStdout -q)
WILDFLY_VERSION=$(grep "<version.jboss.bom>" wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/pom.xml | sed -e 's,.*<version.jboss.bom>\([^<]*\)</version.jboss.bom>.*,\1,g')
WILDFLY_VERSION=$(mvn -B help:evaluate -Dexpression=version.jboss.bom -DforceStdout -q)
echo "ARCHETYPE_VERSION=$ARCHETYPE_VERSION" >> "$GITHUB_ENV"
echo "WILDFLY_VERSION=$WILDFLY_VERSION" >> "$GITHUB_ENV"
echo "## Testing archetypes ${ARCHETYPE_VERSION} with WildFly ${WILDFLY_VERSION}" >> $GITHUB_STEP_SUMMARY
Expand Down
88 changes: 86 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,94 @@

<name>WildFly Archetypes: Aggregator</name>
<description>Aggregator for WildFly Maven archetypes</description>


<!--
To simplify the maintenance of the archetypes all versions of the
dependencies and plugins that are references by the generated project
are defined in the parent pom and evaluated when the archetype are built.
This project defines pluginManagment and dependencyManagemet to trigger
dependencies updates even though this project and its submodules does not
actually use these dependencies.
-->
<properties>
<version.jboss.bom>29.0.0.Final</version.jboss.bom>
<version.wildfly.core>21.1.0.Final</version.wildfly.core>
<version.wildfly.maven.plugin>4.2.0.Final</version.wildfly.maven.plugin>

<version.compiler.plugin>3.9.0</version.compiler.plugin>
<version.surefire.plugin>3.0.0</version.surefire.plugin>
<version.failsafe.plugin>3.1.2</version.failsafe.plugin>
<version.war.plugin>3.4.0</version.war.plugin>
<version.ear.plugin>3.3.0</version.ear.plugin>
<version.ejb.plugin>3.2.1</version.ejb.plugin>
<version.antrun.plugin>3.1.0</version.antrun.plugin>

<maven.compiler.release>11</maven.compiler.release>
</properties>

<modules>
<module>wildfly-jakartaee-ear-archetype</module>
<module>wildfly-jakartaee-webapp-archetype</module>
<module>wildfly-subsystem-archetype</module>
</modules>
</project>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.core</groupId>
<artifactId>wildfly-controller</artifactId>
<version>${version.wildfly.core}</version>
</dependency>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-ee-with-tools</artifactId>
<version>\${version.jboss.bom}</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>

<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>${version.ear.plugin}</version>

</plugin>
<plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>${version.ejb.plugin}</version>
</plugin>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
</plugin>

</plugins>
</pluginManagement>
</build>
</project>
36 changes: 29 additions & 7 deletions wildfly-jakartaee-ear-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>39</version>
<relativePath />
<groupId>org.wildfly.archetype</groupId>
<artifactId>wildfly-archetypes</artifactId>
<version>30.0.0.Final-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>


<groupId>org.wildfly.archetype</groupId>
<artifactId>wildfly-jakartaee-ear-archetype</artifactId>
<version>30.0.0.Final-SNAPSHOT</version>
<packaging>maven-archetype</packaging>

<name>WildFly Archetypes: Jakarta EE EAR Webapp</name>
Expand All @@ -44,6 +41,24 @@
</licenses>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<!--
The pom.xml that is generated by the archetype is filtered
so that we can inject the versions of the various dependencies and
plugins from the parent's pom.xml.
The properties that must not be filtered in that file (eg project.artifactId)
are prefixed with the escape string "\" so that they will be evaluated
when the project is generated by the archetype:generate goal
-->
<directory>src/main/resources-filtered</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
Expand All @@ -65,6 +80,13 @@
<artifactId>maven-archetype-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<escapeString>\</escapeString>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${rootArtifactId}</artifactId>
<version>${version}</version>
<groupId>\${groupId}</groupId>
<artifactId>\${rootArtifactId}</artifactId>
<version>\${version}</version>

<packaging>pom</packaging>
<name>${rootArtifactId}</name>
<name>\${rootArtifactId}</name>
<description>Insert description for your project here.</description>

<modules>
Expand All @@ -40,21 +40,21 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- JBoss dependency versions -->
<version.wildfly.maven.plugin>4.2.0.Final</version.wildfly.maven.plugin>
<version.wildfly.maven.plugin>${version.wildfly.maven.plugin}</version.wildfly.maven.plugin>

<!-- Define the version of the JBoss BOMs we want to import to specify tested stacks. -->
<version.jboss.bom>29.0.0.Final</version.jboss.bom>
<version.jboss.bom>${version.jboss.bom}</version.jboss.bom>

<!-- other plugin versions -->
<version.compiler.plugin>3.9.0</version.compiler.plugin>
<version.ear.plugin>3.3.0</version.ear.plugin>
<version.ejb.plugin>3.2.1</version.ejb.plugin>
<version.surefire.plugin>3.0.0</version.surefire.plugin>
<version.failsafe.plugin>3.0.0</version.failsafe.plugin>
<version.war.plugin>3.3.2</version.war.plugin>
<version.compiler.plugin>${version.compiler.plugin}</version.compiler.plugin>
<version.ear.plugin>${version.ear.plugin}</version.ear.plugin>
<version.ejb.plugin>${version.ejb.plugin}</version.ejb.plugin>
<version.surefire.plugin>${version.surefire.plugin}</version.surefire.plugin>
<version.failsafe.plugin>${version.failsafe.plugin}</version.failsafe.plugin>
<version.war.plugin>${version.war.plugin}</version.war.plugin>

<!-- maven-compiler-plugin -->
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.release>${maven.compiler.release}</maven.compiler.release>
</properties>

<!-- the JBoss community and Red Hat GA Maven repositories -->
Expand Down Expand Up @@ -94,18 +94,18 @@
<!-- Define the version of the EJB jar so that we don't need
to repeat ourselves in every module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${rootArtifactId}-ejb</artifactId>
<version>${project.version}</version>
<groupId>\${project.groupId}</groupId>
<artifactId>\${rootArtifactId}-ejb</artifactId>
<version>\${project.version}</version>
<type>ejb</type>
</dependency>

<!-- Define the version of the WAR so that we don't need to repeat
ourselves in every module -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${rootArtifactId}-web</artifactId>
<version>${project.version}</version>
<groupId>\${project.groupId}</groupId>
<artifactId>\${rootArtifactId}-web</artifactId>
<version>\${project.version}</version>
<type>war</type>
<scope>compile</scope>
</dependency>
Expand All @@ -118,7 +118,7 @@
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-ee-with-tools</artifactId>
<version>${version.jboss.bom}</version>
<version>\${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -130,7 +130,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<version>\${version.compiler.plugin}</version>
<configuration>
<!-- put your configurations here -->
</configuration>
Expand All @@ -142,7 +142,7 @@
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
<version>\${version.wildfly.maven.plugin}</version>
<inherited>true</inherited>
<configuration>
<skip>true</skip>
Expand Down Expand Up @@ -177,7 +177,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<version>\${version.failsafe.plugin}</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -214,7 +214,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<version>\${version.failsafe.plugin}</version>
<executions>
<execution>
<goals>
Expand Down
39 changes: 31 additions & 8 deletions wildfly-jakartaee-webapp-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>39</version>
<relativePath />
</parent>

<groupId>org.wildfly.archetype</groupId>
<artifactId>wildfly-archetypes</artifactId>
<version>30.0.0.Final-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.wildfly.archetype</groupId>
<artifactId>wildfly-jakartaee-webapp-archetype</artifactId>
<version>30.0.0.Final-SNAPSHOT</version>
<packaging>maven-archetype</packaging>

<name>WildFly Archetypes: Jakarta EE Webapp</name>
Expand All @@ -44,6 +41,25 @@
</licenses>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<!--
The pom.xml that is generated by the archetype is filtered
so that we can inject the versions of the various dependencies and
plugins from the parent's pom.xml.
The properties that must not be filtered in that file (eg project.artifactId)
are prefixed with the escape string "\" so that they will be evaluated
when the project is generated by the archetype:generate goal
-->
<directory>src/main/resources-filtered</directory>
<filtering>true</filtering>
</resource>
</resources>

<testResources>
<testResource>
<directory>src/test/resources</directory>
Expand All @@ -65,6 +81,13 @@
<artifactId>maven-archetype-plugin</artifactId>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<escapeString>\</escapeString>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Loading

0 comments on commit 92a27bd

Please sign in to comment.