Merge pull request #6839 from eclipse/jetty-10.0.x_modfiles_filtering

Issue #3514 interpolation of mod files to avoid hardcoding version in mod files
This commit is contained in:
Joakim Erdfelt 2021-09-22 07:27:48 -05:00 committed by GitHub
commit 9c06dc2a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 225 additions and 126 deletions

View File

@ -17,5 +17,5 @@ demo-mock-resources
[files]
basehome:modules/demo.d/demo-jndi.xml|webapps/demo-jndi.xml
maven://org.eclipse.jetty.demos/demo-jndi-webapp/${jetty.version}/war|webapps/demo-jndi.war
maven://org.eclipse.jetty.orbit/javax.mail.glassfish/1.4.1.v201005082020/jar|lib/ext/javax.mail.glassfish-1.4.1.v201005082020.jar
maven://jakarta.transaction/jakarta.transaction-api/1.3.2/jar|lib/ext/jakarta.transaction-api-1.3.2.jar
maven://org.eclipse.jetty.orbit/javax.mail.glassfish/@javax.mail.glassfish.version@/jar|lib/ext/javax.mail.glassfish-@javax.mail.glassfish.version@.jar
maven://jakarta.transaction/jakarta.transaction-api/@jakarta.transaction-api.version@/jar|lib/ext/jakarta.transaction-api-@jakarta.transaction-api.version@.jar

View File

@ -140,7 +140,7 @@
<configuration>
<target>
<concat destfile="${project.build.directory}/gcloud-datastore.mod">
<fileset file="src/main/config-template/modules/gcloud-datastore.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/gcloud-datastore.mod" />
<fileset file="${project.build.directory}/deps.txt" />
</concat>
</target>
@ -148,23 +148,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -7,7 +7,7 @@
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<directory>${project.build.directory}/jetty-config-files</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
@ -17,7 +17,7 @@
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<directory>${project.build.directory}</directory>
<outputDirectory>modules</outputDirectory>
<includes>
<include>gcloud-datastore.mod</include>

View File

@ -23,7 +23,7 @@ lib/jetty-hazelcast-${jetty.version}.jar
lib/hazelcast/hazelcast-${hazelcast.version}.jar
[ini]
hazelcast.version?=4.2.2
hazelcast.version?=@hazelcast.version@
[license]
Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.

View File

@ -23,7 +23,7 @@ lib/jetty-hazelcast-${jetty.version}.jar
lib/hazelcast/hazelcast-${hazelcast.version}.jar
[ini]
hazelcast.version?=4.2.2
hazelcast.version?=@hazelcast.version@
[license]
Hazelcast is an open source project hosted on Github and released under the Apache 2.0 license.

View File

@ -33,9 +33,15 @@
<useBuildFilters>false</useBuildFilters>
<includeEmptyDirs>true</includeEmptyDirs>
<outputDirectory>${assembly-directory}</outputDirectory>
<encoding>UTF-8</encoding>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
@ -871,6 +877,21 @@
<type>jar</type>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -27,5 +27,5 @@ Conscrypt is distributed under the Apache Licence 2.0
https://github.com/google/conscrypt/blob/master/LICENSE
[ini]
conscrypt.version?=2.5.1
conscrypt.version?=@conscrypt.version@
jetty.sslContext.provider?=Conscrypt

View File

@ -27,7 +27,7 @@ http://github.com/hawtio/hawtio
http://www.apache.org/licenses/LICENSE-2.0.html
[ini]
hawtio.version?=2.13.5
hawtio.version?=@hawtio.version@
[ini-template]
## Hawt.io configuration

View File

@ -17,8 +17,8 @@ etc/jamon.xml
[files]
lib/jamon/
maven://com.jamonapi/jamon/2.81|lib/jamon/jamon-2.81.jar
maven://com.jamonapi/jamon_war/2.81/war|lib/jamon/jamon.war
maven://com.jamonapi/jamon/${jamon.version}|lib/jamon/jamon-${jamon.version}.jar
maven://com.jamonapi/jamon_war/${jamon.version}/war|lib/jamon/jamon.war
basehome:modules/jamon/jamon.xml|etc/jamon.xml
[lib]
@ -29,6 +29,9 @@ JAMon is a source forge hosted project released under a BSD derived license.
http://jamonapi.sourceforge.net
http://jamonapi.sourceforge.net/JAMonLicense.html
[ini]
jamon.version?=@jamon.version@
[ini-template]
## Jamon Configuration
# jamon.summaryLabels=demo

View File

@ -15,9 +15,12 @@ jmx
etc/jolokia.xml
[files]
maven://org.jolokia/jolokia-war/1.3.3/war|lib/jolokia/jolokia.war
maven://org.jolokia/jolokia-war/${jolokia.version}/war|lib/jolokia/jolokia.war
basehome:modules/jolokia/jolokia.xml|etc/jolokia.xml
[ini]
jolokia.version?=@jolokia.version@
[license]
Jolokia is released under the Apache License 2.0
http://www.jolokia.org

View File

@ -26,7 +26,7 @@ lib/logging/slf4j-jdk14-${slf4j.version}.jar
-Djava.util.logging.config.file=${jetty.base}/resources/java-util-logging.properties
[ini]
slf4j.version?=2.0.0-alpha5
slf4j.version?=@slf4j.version@
[license]
SLF4J is distributed under the MIT License.

View File

@ -25,7 +25,7 @@ lib/logging/slf4j-log4j12-${slf4j.version}.jar
lib/logging/log4j-${log4j.version}.jar
[ini]
log4j.version?=1.2.17
log4j.version?=@log4j.version@
jetty.webapp.addServerClasses+=,org.apache.log4j.

View File

@ -27,7 +27,7 @@ lib/logging/log4j-api-${log4j.version}.jar
lib/logging/log4j-core-${log4j.version}.jar
[ini]
log4j.version?=2.14.0
log4j.version?=@log4j2.version@
jetty.webapp.addServerClasses+=,org.apache.logging.log4j.
[license]

View File

@ -24,7 +24,7 @@ lib/logging/logback-classic-${logback.version}.jar
lib/logging/logback-core-${logback.version}.jar
[ini]
logback.version?=1.3.0-alpha9
logback.version?=@logback.version@
jetty.webapp.addServerClasses+=,ch.qos.logback.
[license]

View File

@ -15,5 +15,5 @@ slf4j
lib/logging/slf4j-api-${slf4j.version}.jar
[ini]
slf4j.version?=2.0.0-alpha5
slf4j.version?=@slf4j.version@
jetty.webapp.addServerClasses+=,org.slf4j.

View File

@ -13,7 +13,7 @@ lib/infinispan-common-${jetty.version}.jar
lib/infinispan/*.jar
[ini]
infinispan.version?=11.0.11.Final
infinispan.version?=@infinispan.version@
[license]
Infinispan is an open source project hosted on Github and released under the Apache 2.0 license.

View File

@ -60,7 +60,7 @@
<configuration>
<target>
<concat destfile="${project.build.directory}/infinispan-embedded-query-libs.mod">
<fileset file="src/main/config-template/modules/sessions/infinispan/embedded/infinispan-embedded-query-libs.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/sessions/infinispan/embedded/infinispan-embedded-query-libs.mod" />
<fileset file="${project.build.directory}/deps.txt" />
</concat>
</target>
@ -68,23 +68,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -7,7 +7,7 @@
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<directory>${project.build.directory}/jetty-config-files</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
@ -17,7 +17,7 @@
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<directory>${project.build.directory}</directory>
<outputDirectory>modules/sessions/infinispan/embedded</outputDirectory>
<includes>
<include>infinispan-embedded-query-libs.mod</include>

View File

@ -16,7 +16,7 @@ sessions/infinispan/embedded/infinispan-embedded-libs
basehome:modules/sessions/infinispan/embedded/infinispan.xml|etc/infinispan.xml
[ini]
infinispan.version?=11.0.11.Final
infinispan.version?=@infinispan.version@
[ini-template]
#jetty.session.infinispan.idleTimeout.seconds=0

View File

@ -61,7 +61,7 @@
<configuration>
<target>
<concat destfile="${project.build.directory}/infinispan-remote-query-libs.mod">
<fileset file="src/main/config-template/modules/sessions/infinispan/remote/infinispan-remote-query-libs.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/sessions/infinispan/remote/infinispan-remote-query-libs.mod" />
<fileset file="${project.build.directory}/deps.txt" />
</concat>
</target>
@ -69,23 +69,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View File

@ -7,7 +7,7 @@
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<directory>${project.build.directory}/jetty-config-files</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
@ -17,7 +17,7 @@
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<directory>${project.build.directory}</directory>
<outputDirectory>modules/sessions/infinispan/remote</outputDirectory>
<includes>
<include>infinispan-remote-query-libs.mod</include>

View File

@ -62,7 +62,7 @@
<configuration>
<target>
<concat destfile="${project.build.directory}/infinispan-remote-libs.mod">
<fileset file="src/main/config-template/modules/sessions/infinispan/remote/infinispan-remote-libs.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/sessions/infinispan/remote/infinispan-remote-libs.mod" />
<fileset file="${project.build.directory}/deps.txt" />
</concat>
</target>
@ -70,24 +70,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -7,7 +7,7 @@
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<directory>${project.build.directory}/jetty-config-files</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
@ -17,7 +17,7 @@
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<directory>${project.build.directory}</directory>
<outputDirectory>modules/sessions/infinispan/remote</outputDirectory>
<includes>
<include>infinispan-remote-libs.mod</include>

View File

@ -16,7 +16,7 @@ sessions/infinispan/remote/infinispan-remote-libs
basehome:modules/sessions/infinispan/remote/resources/hotrod-client.properties|resources/hotrod-client.properties
[ini]
infinispan.version?=11.0.11.Final
infinispan.version?=@infinispan.version@
[license]

View File

@ -18,7 +18,7 @@
<dependency>
<groupId>com.googlecode.xmemcached</groupId>
<artifactId>xmemcached</artifactId>
<version>2.4.7</version>
<version>${xmemcached.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>

View File

@ -11,7 +11,10 @@ session-store
logging/slf4j
[files]
maven://com.googlecode.xmemcached/xmemcached/2.4.7|lib/xmemcached/xmemcached-2.4.7.jar
maven://com.googlecode.xmemcached/xmemcached/${xmemcached.version}|lib/xmemcached/xmemcached-${xmemcached.version}.jar
[ini]
xmemcached.version?=@xmemcached.version@
[lib]
lib/jetty-memcached-sessions-${jetty.version}.jar

View File

@ -28,7 +28,7 @@
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.13.2</version>
<version>${mongodb.version}</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -14,7 +14,7 @@ sessions
sessions/mongo/${connection-type}
[files]
maven://org.mongodb/mongo-java-driver/2.13.2|lib/nosql/mongo-java-driver-2.13.2.jar
maven://org.mongodb/mongo-java-driver/${mongodb.version}|lib/nosql/mongo-java-driver-${mongodb.version}.jar
[lib]
lib/jetty-nosql-${jetty.version}.jar
@ -28,6 +28,7 @@ http://www.apache.org/licenses/LICENSE-2.0.html
[ini]
connection-type?=address
mongodb.version?=@mongodb.version@
[ini-template]
#jetty.session.mongo.dbName=HttpSessions

View File

@ -76,32 +76,15 @@
<replaceregexp file="${project.build.directory}/deps.txt" match=" *(.*):(.*):jar:(.*):.*$" replace="maven://\1/\2/\3|lib/jnr/\2-\3.jar" byline="true" />
<replaceregexp file="${project.build.directory}/deps.txt" match="The following files have been resolved:" replace="[files]" />
<concat destfile="${project.build.directory}/unixsocket.mod">
<fileset file="src/main/config-template/modules/unixsocket-prefix.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/unixsocket-prefix.mod" />
<fileset file="${project.build.directory}/deps.txt" />
<fileset file="src/main/config-template/modules/unixsocket-suffix.mod" />
<fileset file="${project.build.directory}/jetty-config-files/modules/unixsocket-suffix.mod" />
</concat>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -7,7 +7,7 @@
</formats>
<fileSets>
<fileSet>
<directory>src/main/config-template</directory>
<directory>${project.build.directory}/jetty-config-files</directory>
<outputDirectory></outputDirectory>
<includes>
<include>**</include>
@ -18,7 +18,7 @@
</excludes>
</fileSet>
<fileSet>
<directory>target</directory>
<directory>${project.build.directory}</directory>
<outputDirectory>modules</outputDirectory>
<includes>
<include>unixsocket.mod</include>

160
pom.xml
View File

@ -21,6 +21,7 @@
<build-support.version>1.5</build-support.version>
<checkstyle.version>9.0</checkstyle.version>
<slf4j.version>2.0.0-alpha5</slf4j.version>
<log4j.version>1.2.17</log4j.version>
<log4j2.version>2.14.0</log4j2.version>
<logback.version>1.3.0-alpha9</logback.version>
<disruptor.version>3.4.2</disruptor.version>
@ -32,6 +33,11 @@
<infinispan.protostream.version>4.3.4.Final</infinispan.protostream.version>
<gson.version>2.8.8</gson.version>
<grpc.version>1.40.1</grpc.version>
<hawtio.version>2.13.5</hawtio.version>
<jamon.version>2.81</jamon.version>
<jolokia.version>1.3.3</jolokia.version>
<javax.mail.glassfish.version>1.4.1.v201005082020</javax.mail.glassfish.version>
<jakarta.transaction-api.version>1.3.3</jakarta.transaction-api.version>
<google.errorprone.version>2.9.0</google.errorprone.version>
<alpn.agent.version>2.0.10</alpn.agent.version>
<hazelcast.version>4.2.2</hazelcast.version>
@ -52,6 +58,8 @@
<jboss.logging.version>3.4.2.Final</jboss.logging.version>
<jetty.perf-helper.version>1.0.7</jetty.perf-helper.version>
<ant.version>1.10.11</ant.version>
<xmemcached.version>2.4.7</xmemcached.version>
<mongodb.version>2.13.2</mongodb.version>
<!-- OSGI import-package -->
<osgi.slf4j.import.packages>org.slf4j;version="[1.7,3.0)", org.slf4j.event;version="[1.7,3.0)", org.slf4j.helpers;version="[1.7,3.0)", org.slf4j.spi;version="[1.7,3.0)"</osgi.slf4j.import.packages>
@ -484,7 +492,7 @@
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-assembly-descriptors</artifactId>
<version>1.0</version>
<version>1.1</version>
</dependency>
</dependencies>
</plugin>
@ -1109,12 +1117,12 @@
<dependency>
<groupId>org.eclipse.jetty.orbit</groupId>
<artifactId>javax.mail.glassfish</artifactId>
<version>1.4.1.v201005082020</version>
<version>${javax.mail.glassfish.version}</version>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>1.3.3</version>
<version>${jakarta.transaction-api.version}</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
@ -1283,6 +1291,7 @@
<artifactId>jetty-perf-helper</artifactId>
<version>${jetty.perf-helper.version}</version>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl104-over-slf4j</artifactId>
@ -1309,6 +1318,26 @@
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss.logging.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
@ -1370,6 +1399,42 @@
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<!-- some modules use those artifacts so we can manage version from here -->
<dependency>
<groupId>io.hawt</groupId>
<artifactId>hawtio-default</artifactId>
<version>${hawtio.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>com.jamonapi</groupId>
<artifactId>jamon</artifactId>
<version>${jamon.version}</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.jamonapi</groupId>
<artifactId>jamon_war</artifactId>
<version>${jamon.version}</version>
<type>war</type>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-war</artifactId>
<version>${jolokia.version}</version>
<type>war</type>
</dependency>
</dependencies>
</dependencyManagement>
@ -1462,6 +1527,36 @@
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<outputDirectory>${project.build.directory}/jetty-config-files</outputDirectory>
<resources>
<resource>
<directory>src/main/config</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.p12</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
@ -1483,6 +1578,65 @@
</plugins>
</build>
</profile>
<profile>
<id>config-template</id>
<activation>
<file>
<exists>src/main/config-template</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<encoding>UTF-8</encoding>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<outputDirectory>${project.build.directory}/jetty-config-files</outputDirectory>
<resources>
<resource>
<directory>src/main/config-template</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.p12</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/config.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>eclipse-release</id>
<modules>