Jetty 12.0.x use Maven build cache for PRs and branches except jetty-12.0.x main branch (#9871)

* apply configuration/changes for build cache

Signed-off-by: Olivier Lamy <olamy@apache.org>

Signed-off-by: Olivier Lamy <olamy@apache.org>
This commit is contained in:
Olivier Lamy 2023-08-22 10:46:46 +10:00 committed by GitHub
parent 2178dc2913
commit 97e1527ed6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 562 additions and 117 deletions

View File

@ -74,14 +74,14 @@ jobs:
- name: Set up Maven - name: Set up Maven
uses: stCarolas/setup-maven@v4.5 uses: stCarolas/setup-maven@v4.5
with: with:
maven-version: 3.8.6 maven-version: 3.9.4
- name: Set up Maven - name: Set up Maven
run: run:
mvn -e -B -V org.apache.maven.plugins:maven-wrapper-plugin:3.1.0:wrapper "-Dmaven=3.8.6" mvn -e -B -V org.apache.maven.plugins:maven-wrapper-plugin:3.1.0:wrapper "-Dmaven=3.9.4"
- name: Clean install dependencies and build - name: Clean install dependencies and build
run: mvn clean install -DskipTests -B -V run: mvn clean install -DskipTests -B -Dmaven.build.cache.enabled=false
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

View File

@ -8,3 +8,5 @@
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED

View File

@ -0,0 +1,105 @@
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
<configuration>
<hashAlgorithm>XXMM</hashAlgorithm>
<enabled>true</enabled>
<!-- activated via cli -->
<!-- to disable it just use -Dmaven.build.cache.enabled=false -->
<!--
-Dmaven.build.cache.remote.url=dav:http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true
-Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server
-->
<!-- <remote enabled="true" saveToRemote="true" id="remote-build-cache-server">-->
<!-- <url>dav:http://nginx-cache-service.jenkins.svc.cluster.local:80</url>-->
<!-- </remote>-->
<multiModule>
<discovery>
<scanProfiles>
<scanProfile>ci</scanProfile>
</scanProfiles>
</discovery>
</multiModule>
</configuration>
<input>
<global>
<glob>*.{java,xml,properties,mod,adoc}</glob>
</global>
<plugins>
<plugin groupId="org.apache.maven.plugins" artifactId="maven-invoker-plugin">
<effectivePom>
<excludeProperties>
<excludeProperty>scriptVariables</excludeProperty>
<excludeProperty>settingsFile</excludeProperty>
<excludeProperty>filterProperties</excludeProperty>
</excludeProperties>
</effectivePom>
</plugin>
<plugin groupId="org.apache.maven.plugins" artifactId="maven-surefire-plugin">
<effectivePom>
<excludeProperties>
<excludeProperty>systemPropertyVariables</excludeProperty>
</excludeProperties>
</effectivePom>
</plugin>
<plugin artifactId="asciidoctor-maven-plugin" groupId="org.asciidoctor">
<effectivePom>
<excludeProperties>
<excludeProperty>attributes</excludeProperty>
</excludeProperties>
</effectivePom>
</plugin>
</plugins>
</input>
<executionControl>
<runAlways>
<goalsLists>
<goalsList artifactId="maven-install-plugin">
<goals>
<goal>install</goal>
</goals>
</goalsList>
</goalsLists>
</runAlways>
<reconcile>
<plugins>
<!-- workaround for https://issues.apache.org/jira/browse/MBUILDCACHE-56 -->
<plugin artifactId="maven-enforcer-plugin" goal="enforce">
<nologs>
<nolog propertyName="commandLineRules"/>
</nologs>
</plugin>
<plugin artifactId="maven-invoker-plugin" goal="integration-test">
<nologs>
<nolog propertyName="scriptVariables"/>
<nolog propertyName="settingsFile"/>
<nolog propertyName="filterProperties"/>
</nologs>
</plugin>
<plugin artifactId="maven-surefire-plugin" goal="test">
<reconciles>
<reconcile propertyName="skip" skipValue="true"/>
<reconcile propertyName="skipExec" skipValue="true"/>
<reconcile propertyName="skipTests" skipValue="true"/>
<reconcile propertyName="testFailureIgnore" skipValue="true"/>
</reconciles>
<nologs>
<nolog propertyName="systemPropertyVariables"/>
</nologs>
</plugin>
<plugin artifactId="asciidoctor-maven-plugin" goal="process-asciidoc" groupId="org.asciidoctor">
<nologs>
<nolog propertyName="attributes"/>
</nologs>
</plugin>
</plugins>
</reconcile>
</executionControl>
<output>
<exclude>
<patterns>
<pattern>.*\.zip</pattern>
</patterns>
</exclude>
</output>
</cache>

1
.mvn/maven.config Normal file
View File

@ -0,0 +1 @@
-Daether.dependencyCollector.impl=bf

36
Jenkinsfile vendored
View File

@ -18,7 +18,7 @@ pipeline {
timeout( time: 180, unit: 'MINUTES' ) { timeout( time: 180, unit: 'MINUTES' ) {
checkout scm checkout scm
mavenBuild( "jdk21", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3") mavenBuild( "jdk21", "clean install -Dspotbugs.skip=true -Djacoco.skip=true", "maven3")
recordIssues id: "jdk21", name: "Static Analysis jdk19", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()] recordIssues id: "jdk21", name: "Static Analysis jdk21", aggregatingResults: true, enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle()]
} }
} }
} }
@ -28,7 +28,7 @@ pipeline {
steps { steps {
timeout( time: 180, unit: 'MINUTES' ) { timeout( time: 180, unit: 'MINUTES' ) {
checkout scm checkout scm
mavenBuild( "jdk17", "clean install javadoc:javadoc -Perrorprone", "maven3") mavenBuild( "jdk17", "clean install -Perrorprone", "maven3") // javadoc:javadoc
// Collect up the jacoco execution results (only on main build) // Collect up the jacoco execution results (only on main build)
jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class', jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class',
exclusionPattern: '' + exclusionPattern: '' +
@ -104,9 +104,21 @@ def mavenBuild(jdk, cmdline, mvnName) {
withEnv(["JAVA_HOME=${ tool "$jdk" }", withEnv(["JAVA_HOME=${ tool "$jdk" }",
"PATH+MAVEN=${ tool "$jdk" }/bin:${tool "$mvnName"}/bin", "PATH+MAVEN=${ tool "$jdk" }/bin:${tool "$mvnName"}/bin",
"MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) { "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {
configFileProvider( configFileProvider(
[configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { [configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS'),
sh "mvn -Dmaven.repo.uri=http://10.0.0.15:8081/repository/maven-public/ -Dmaven.test.failure.ignore=true -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e $cmdline" configFile(fileId: 'maven-build-cache-config.xml', variable: 'MVN_BUILD_CACHE_CONFIG')]) {
//sh "cp $MVN_BUILD_CACHE_CONFIG .mvn/maven-build-cache-config.xml"
//-Dmaven.build.cache.configPath=$MVN_BUILD_CACHE_CONFIG
buildCache = useBuildCache()
if (buildCache) {
echo "Using build cache"
extraArgs = " -Dmaven.build.cache.restoreGeneratedSources=false -Dmaven.build.cache.remote.url=dav:http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server "
} else {
// when not using cache
echo "Not using build cache"
extraArgs = " -Dmaven.test.failure.ignore=true -Dmaven.build.cache.enabled=false "
}
sh "mvn $extraArgs -DsettingsPath=$GLOBAL_MVN_SETTINGS -Dmaven.repo.uri=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-public/ -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -U $cmdline"
} }
} }
} }
@ -117,4 +129,18 @@ def mavenBuild(jdk, cmdline, mvnName) {
} }
} }
/**
* calculate to use cache or not. per default will not run
*/
def useBuildCache() {
def labelNoBuildCache = false
if (env.BRANCH_NAME ==~ /PR-\d+/) {
labelNoBuildCache = pullRequest.labels.contains("build-no-cache")
}
def noBuildCache = (env.BRANCH_NAME == 'jetty-12.0.x') || labelNoBuildCache;
return !noBuildCache;
// want to skip build cache
// return false
}
// vim: et:ts=2:sw=2:ft=groovy // vim: et:ts=2:sw=2:ft=groovy

View File

@ -70,4 +70,4 @@ The documentation is divided into three guides, based on use case:
# Commercial Support # Commercial Support
Expert advice and production support of Jetty are provided by [Webtide](https://webtide.com). Expert advice and production support of Jetty are provided by [Webtide](https://webtide.com).

View File

@ -14,28 +14,28 @@ mkdir -p $REPORT_OUTPUT_DIR
echo "HTML Reports can be found in $REPORT_OUTPUT_DIR" echo "HTML Reports can be found in $REPORT_OUTPUT_DIR"
mvn -N -B -Pdependency-updates-reports validate mvn -N -B -Pdependency-updates-reports validate -Dmaven.build.cache.enabled=false
cp -Rv target/site/* $REPORT_OUTPUT_DIR cp -Rv target/site/* $REPORT_OUTPUT_DIR
mv $REPORT_OUTPUT_DIR/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-root.html mv $REPORT_OUTPUT_DIR/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-root.html
pushd jetty-core pushd jetty-core
mvn -B -Pdependency-updates-reports validate mvn -B -Pdependency-updates-reports validate -Dmaven.build.cache.enabled=false
cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-core.html cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-core.html
popd popd
pushd jetty-ee10 pushd jetty-ee10
mvn -B -Pdependency-updates-reports validate mvn -B -Pdependency-updates-reports validate -Dmaven.build.cache.enabled=false
cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee10.html cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee10.html
popd popd
pushd jetty-ee9 pushd jetty-ee9
mvn -B -Pdependency-updates-reports validate mvn -B -Pdependency-updates-reports validate -Dmaven.build.cache.enabled=false
cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee9.html cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee9.html
popd popd
pushd jetty-ee8 pushd jetty-ee8
mvn -B -Pdependency-updates-reports validate mvn -B -Pdependency-updates-reports validate -Dmaven.build.cache.enabled=false
cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee8.html cp target/site/dependency-updates-aggregate-report.html $REPORT_OUTPUT_DIR/dependency-updates-report-ee8.html
popd popd

View File

@ -88,7 +88,7 @@ if [ ! -d "$ALT_DEPLOY_DIR" ] ; then
fi fi
# DEPLOY_OPTS="-Dmaven.test.failure.ignore=true" # DEPLOY_OPTS="-Dmaven.test.failure.ignore=true"
DEPLOY_OPTS="-DskipTests -Dasciidoctor.skip=false" DEPLOY_OPTS="-DskipTests -Dasciidoctor.skip=false -Dmaven.build.cache.enabled=false"
# DEPLOY_OPTS="$DEPLOY_OPTS -DaltDeploymentRepository=intarget::default::file://$ALT_DEPLOY_DIR/" # DEPLOY_OPTS="$DEPLOY_OPTS -DaltDeploymentRepository=intarget::default::file://$ALT_DEPLOY_DIR/"
# Uncomment for Java 1.7 # Uncomment for Java 1.7
@ -131,10 +131,10 @@ reportMavenTestFailures() {
echo "" echo ""
if proceedyn "Are you sure you want to release using above? (y/N)" n; then if proceedyn "Are you sure you want to release using above? (y/N)" n; then
mvn clean install -pl build mvn clean install -pl build -Dmaven.build.cache.enabled=false
echo "" echo ""
if proceedyn "Update VERSION.txt for $VER_RELEASE? (Y/n)" y; then if proceedyn "Update VERSION.txt for $VER_RELEASE? (Y/n)" y; then
mvn -N -Pupdate-version generate-resources mvn -N -Pupdate-version generate-resources -Dmaven.build.cache.enabled=false
cp VERSION.txt VERSION.txt.backup cp VERSION.txt VERSION.txt.backup
cat VERSION.txt.backup | sed -e "s/$VER_CURRENT/$VER_RELEASE/" > VERSION.txt cat VERSION.txt.backup | sed -e "s/$VER_CURRENT/$VER_RELEASE/" > VERSION.txt
rm VERSION.txt.backup rm VERSION.txt.backup
@ -146,6 +146,7 @@ if proceedyn "Are you sure you want to release using above? (y/N)" n; then
# This is equivalent to 'mvn release:prepare' # This is equivalent to 'mvn release:prepare'
if proceedyn "Update project.versions for $VER_RELEASE? (Y/n)" y; then if proceedyn "Update project.versions for $VER_RELEASE? (Y/n)" y; then
mvn org.codehaus.mojo:versions-maven-plugin:2.7:set \ mvn org.codehaus.mojo:versions-maven-plugin:2.7:set \
-Dmaven.build.cache.enabled=false \
-Peclipse-release \ -Peclipse-release \
-DoldVersion="$VER_CURRENT" \ -DoldVersion="$VER_CURRENT" \
-DnewVersion="$VER_RELEASE" \ -DnewVersion="$VER_RELEASE" \
@ -175,6 +176,7 @@ if proceedyn "Are you sure you want to release using above? (y/N)" n; then
cat VERSION.txt.backup >> VERSION.txt cat VERSION.txt.backup >> VERSION.txt
echo "Update project.versions for $VER_NEXT" echo "Update project.versions for $VER_NEXT"
mvn org.codehaus.mojo:versions-maven-plugin:2.7:set \ mvn org.codehaus.mojo:versions-maven-plugin:2.7:set \
-Dmaven.build.cache.enabled=false \
-Peclipse-release \ -Peclipse-release \
-DoldVersion="$VER_RELEASE" \ -DoldVersion="$VER_RELEASE" \
-DnewVersion="$VER_NEXT" \ -DnewVersion="$VER_NEXT" \

View File

@ -14,6 +14,7 @@
<properties> <properties>
<bundle-symbolic-name>${project.groupId}</bundle-symbolic-name> <bundle-symbolic-name>${project.groupId}</bundle-symbolic-name>
<asciidoctor.skip>${skipTests}</asciidoctor.skip> <asciidoctor.skip>${skipTests}</asciidoctor.skip>
<jacoco.skip>true</jacoco.skip>
</properties> </properties>
<profiles> <profiles>
@ -137,11 +138,13 @@
<attributes> <attributes>
<project-basedir>${project.basedir}</project-basedir> <project-basedir>${project.basedir}</project-basedir>
<project-version>${project.version}</project-version> <project-version>${project.version}</project-version>
<maven-local-repo>${settings.localRepository}</maven-local-repo> <maven-local-repo>${session.repositorySession.localRepository.basedir.absolutePath}</maven-local-repo>
<version>${project.version}</version> <version>${project.version}</version>
<!-- <SRCDIR>./src/main/asciidoc</SRCDIR>-->
<prog-guide>../programming-guide/index.html</prog-guide> <prog-guide>../programming-guide/index.html</prog-guide>
<op-guide>../operations-guide/index.html</op-guide> <op-guide>../operations-guide/index.html</op-guide>
<javadoc-url>https://eclipse.dev/jetty/javadoc/jetty-12</javadoc-url> <javadoc-url>https://eclipse.dev/jetty/javadoc/jetty-12</javadoc-url>
<!-- <TIMESTAMP>2023-07-31T06:06:52Z</TIMESTAMP>-->
</attributes> </attributes>
</configuration> </configuration>
<executions> <executions>

View File

@ -24,11 +24,11 @@ Here are the minimum Maven and JDK version build requirements for each actively
.Build versioning requirements by branch .Build versioning requirements by branch
|=== |===
| Branch | Maven Version | Minimum JDK | Branch | Maven Version | Minimum JDK | Recommended JDK
| jetty-12.0.x | Maven 3.8.6+ | OpenJDK 17+ | jetty-12.0.x | Maven 3.9.2+ | OpenJDK 17+ | OpenJDK 19
| jetty-11.0.x | Maven 3.8.6+ | OpenJDK 11+ | jetty-11.0.x | Maven 3.8.6+ | OpenJDK 11+ | OpenJDK 17
| jetty-10.0.x | Maven 3.8.6+ | OpenJDK 11+ | jetty-10.0.x | Maven 3.8.6+ | OpenJDK 11+ | OpenJDK 17
|=== |===
To build the Jetty documentation, OpenJDK 19+ is required due to the use of the virtual thread APIs. To build the Jetty documentation, OpenJDK 19+ is required due to the use of the virtual thread APIs.
@ -72,6 +72,18 @@ Not all test cases are as timing independent as they should be, which can result
You can help us track these flaky tests by opening an https://github.com/eclipse/jetty.project/issues[issue] when you come across one. You can help us track these flaky tests by opening an https://github.com/eclipse/jetty.project/issues[issue] when you come across one.
==== ====
[[cg-build-cache]]
=== Maven Build Cache
Per default, the build is using the https://maven.apache.org/extensions/maven-build-cache-extension[Maven Build Cache extension]
this means you will use your local build cache, To disable it you can use the property
[source, shell]
----
$ mvn clean install -Dmaven.build.cache.enabled=false
----
[[cg-build-parallel]] [[cg-build-parallel]]
=== Executing tests in parallel === Executing tests in parallel

View File

@ -24,12 +24,6 @@
</instructions> </instructions>
</configuration> </configuration>
</plugin> </plugin>
<!-- always include the sources to be able to prepare the eclipse-jetty-SDK feature
with a snapshot. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>

View File

@ -13,12 +13,6 @@
</properties> </properties>
<build> <build>
<plugins> <plugins>
<!-- always include the sources to be able to prepare the eclipse-jetty-SDK feature
with a snapshot. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin> <plugin>
<groupId>org.apache.felix</groupId> <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId> <artifactId>maven-bundle-plugin</artifactId>

View File

@ -83,6 +83,31 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/jetty-util</outputDirectory>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
<dependencies> <dependencies>

View File

@ -163,7 +163,7 @@ public class PropertyPassingTest
cp.append(pathSep); cp.append(pathSep);
cp.append(MavenTestingUtils.getProjectDir("target/test-classes")); cp.append(MavenTestingUtils.getProjectDir("target/test-classes"));
cp.append(pathSep); cp.append(pathSep);
cp.append(MavenTestingUtils.getProjectDir("../jetty-util/target/classes")); // TODO horrible hack! cp.append(MavenTestingUtils.getProjectDir("target/jetty-util"));
return cp.toString(); return cp.toString();
} }

View File

@ -56,7 +56,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<systemPropertyVariables> <systemPropertyVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
</systemPropertyVariables> </systemPropertyVariables>
<argLine> <argLine>
@{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.util=org.eclipse.jetty.logging @{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.util=org.eclipse.jetty.logging

View File

@ -1957,6 +1957,8 @@ public class XmlConfiguration
} }
else if (arg.toLowerCase(Locale.ENGLISH).endsWith(".xml")) else if (arg.toLowerCase(Locale.ENGLISH).endsWith(".xml"))
{ {
if (LOG.isDebugEnabled())
LOG.debug("Parsing xml file {}", arg);
// Create an XmlConfiguration // Create an XmlConfiguration
XmlConfiguration configuration = new XmlConfiguration(ResourceFactory.of(mountContainer).newResource(arg)); XmlConfiguration configuration = new XmlConfiguration(ResourceFactory.of(mountContainer).newResource(arg));

View File

@ -117,18 +117,36 @@
<artifactId>jetty-websocket-jetty-client</artifactId> <artifactId>jetty-websocket-jetty-client</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jndi-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId> <groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-jsp-webapp</artifactId> <artifactId>jetty-ee10-demo-jsp-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-simple-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId> <groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-spec-webapp</artifactId> <artifactId>jetty-ee10-demo-spec-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-async-rest-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
@ -137,8 +155,12 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<environmentVariables> <environmentVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <jettyVersion>${project.version}</jettyVersion>
</environmentVariables> </environmentVariables>
<systemPropertyVariables>
<mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<jettyVersion>${project.version}</jettyVersion>
</systemPropertyVariables>
<useManifestOnlyJar>false</useManifestOnlyJar> <useManifestOnlyJar>false</useManifestOnlyJar>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -34,7 +34,7 @@ public class JettyDemos
{ {
private static final Logger LOG = LoggerFactory.getLogger(JettyDemos.class); private static final Logger LOG = LoggerFactory.getLogger(JettyDemos.class);
private static final Path JETTY_DEMOS_DIR; private static final Path JETTY_DEMOS_DIR;
private static final String VERSION; private static String VERSION = System.getProperty("jettyVersion", "unknown");
static static
{ {
@ -71,29 +71,27 @@ public class JettyDemos
LOG.warn("Unable to resolve Jetty Demos location", th); LOG.warn("Unable to resolve Jetty Demos location", th);
} }
} }
JETTY_DEMOS_DIR = demosDir; JETTY_DEMOS_DIR = demosDir;
String version = "unknown"; String version = "unknown";
Path pomFile = demosDir.resolve("pom.xml"); if (version.equals(VERSION))
try (Stream<String> lineStream = Files.lines(pomFile))
{ {
String versionLine = lineStream Path pomFile = demosDir.resolve("pom.xml");
.filter((line) -> line.contains("<version>")) try (Stream<String> lineStream = Files.lines(pomFile))
.findFirst() {
.orElseThrow(() -> String versionLine = lineStream
{ .filter((line) -> line.contains("<version>"))
throw new RuntimeException("Unable to find <version> in " + pomFile); .findFirst()
}); .orElseThrow(() -> new RuntimeException("Unable to find <version> in " + pomFile));
version = versionLine.replaceAll("<[^>]*>", "").trim(); version = versionLine.replaceAll("<[^>]*>", "").trim();
} }
catch (IOException e) catch (IOException e)
{ {
LOG.warn("Unable to find <version> in " + pomFile, e); LOG.warn("Unable to find <version> in " + pomFile, e);
} }
VERSION = version; VERSION = version;
}
} }
private static Path asDirectory(String path) private static Path asDirectory(String path)
@ -141,6 +139,33 @@ public class JettyDemos
return JETTY_DEMOS_DIR; return JETTY_DEMOS_DIR;
} }
public static Path find(String path, MavenCoordinate mavenCoordinate) throws FileNotFoundException
{
try
{
return find(path);
}
catch (FileNotFoundException e)
{
//could be not in the target directory if restored from build cache
// but as the build always runs install the artifact should be there in local repository
}
//.repository/org/eclipse/jetty/ee9/demos/jetty-ee9-demo-jndi-webapp/12.0.0-SNAPSHOT/jetty-ee9-demo-jndi-webapp-12.0.0-SNAPSHOT.war
String version = mavenCoordinate.version().isEmpty() ? VERSION : mavenCoordinate.version();
Path result = Paths.get(System.getProperty("mavenRepoPath", System.getProperty("user.home") + "/.m2/repository"),
mavenCoordinate.groupId().replaceAll("\\.", "/"),
mavenCoordinate.artifactId(),
version,
mavenCoordinate.artifactId() + "-" + version + "." + mavenCoordinate.packaging()
);
if (!Files.exists(result))
{
throw new FileNotFoundException(result.toString());
}
return result;
}
@Deprecated
public static Path find(String path) throws FileNotFoundException public static Path find(String path) throws FileNotFoundException
{ {
String expandedPath = path.replaceAll("@VER@", VERSION); String expandedPath = path.replaceAll("@VER@", VERSION);
@ -152,6 +177,15 @@ public class JettyDemos
return result; return result;
} }
/**
*
* @param groupId Maven groupId
* @param artifactId Maven artifactId
* @param version can be <code>null</code> and default current project version will be used
* @param packaging Maven packaging (war, jar)
*/
public record MavenCoordinate(String groupId, String artifactId, String version, String packaging){}
public static void main(String... arg) public static void main(String... arg)
{ {
System.err.println("Jetty Demos Dir is " + JETTY_DEMOS_DIR); System.err.println("Jetty Demos Dir is " + JETTY_DEMOS_DIR);

View File

@ -146,7 +146,9 @@ public class LikeJettyXml
Path testWebapp = webappsDir.resolve("test.war"); Path testWebapp = webappsDir.resolve("test.war");
if (!Files.exists(testWebapp)) if (!Files.exists(testWebapp))
{ {
Path testWebappSrc = JettyDemos.find("jetty-ee10-demo-simple-webapp/target/jetty-ee10-demo-simple-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee10.demos",
"jetty-ee10-demo-simple-webapp", "", "war");
Path testWebappSrc = JettyDemos.find("jetty-ee10-demo-simple-webapp/target/jetty-ee10-demo-simple-webapp-@VER@.war", mavenCoordinate);
Files.copy(testWebappSrc, testWebapp); Files.copy(testWebappSrc, testWebapp);
} }

View File

@ -39,7 +39,9 @@ public class OneWebApp
// PlusConfiguration) to choosing where the webapp will unpack itself. // PlusConfiguration) to choosing where the webapp will unpack itself.
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("demo-async-rest/demo-async-rest-webapp/target/demo-async-rest-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee10.demos",
"jetty-ee10-demo-async-rest-webapp", "", "war");
Path warFile = JettyDemos.find("demo-async-rest/demo-async-rest-webapp/target/demo-async-rest-webapp-@VER@.war", mavenCoordinate);
webapp.setWar(warFile.toString()); webapp.setWar(warFile.toString());
// A WebAppContext is a ContextHandler as well so it needs to be set to // A WebAppContext is a ContextHandler as well so it needs to be set to

View File

@ -44,7 +44,9 @@ public class OneWebAppWithJsp
// the webapp will unpack itself. // the webapp will unpack itself.
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("demo-jsp-webapp/target/demo-jsp-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee10.demos",
"jetty-ee10-demo-jsp-webapp", "", "war");
Path warFile = JettyDemos.find("demo-jsp-webapp/target/demo-jsp-webapp-@VER@.war", mavenCoordinate);
webapp.setWarResource(webapp.getResourceFactory().newResource(warFile)); webapp.setWarResource(webapp.getResourceFactory().newResource(warFile));
webapp.setExtractWAR(true); webapp.setExtractWAR(true);

View File

@ -45,7 +45,9 @@ public class ServerWithAnnotations
webapp.addConfiguration(new EnvConfiguration(), new PlusConfiguration(), new AnnotationConfiguration()); webapp.addConfiguration(new EnvConfiguration(), new PlusConfiguration(), new AnnotationConfiguration());
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("ee10-demo-spec/ee10-demo-spec-webapp/target/demo-spec-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee10.demos",
"jetty-ee10-demo-spec-webapp", "", "war");
Path warFile = JettyDemos.find("ee10-demo-spec/ee10-demo-spec-webapp/target/demo-spec-webapp-@VER@.war", mavenCoordinate);
webapp.setWar(warFile.toString()); webapp.setWar(warFile.toString());
webapp.setAttribute( webapp.setAttribute(
"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern",

View File

@ -35,7 +35,9 @@ public class ServerWithJNDI
// Create a WebApp // Create a WebApp
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path testJndiWar = JettyDemos.find("jetty-ee10-demo-jndi-webapp/target/jetty-ee10-demo-jndi-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee10.demos",
"jetty-ee10-demo-jndi-webapp", "", "war");
Path testJndiWar = JettyDemos.find("jetty-ee10-demo-jndi-webapp/target/jetty-ee10-demo-jndi-webapp-@VER@.war", mavenCoordinate);
webapp.setWarResource(webapp.getResourceFactory().newResource(testJndiWar)); webapp.setWarResource(webapp.getResourceFactory().newResource(testJndiWar));
server.setHandler(webapp); server.setHandler(webapp);

View File

@ -123,6 +123,46 @@
</artifactItems> </artifactItems>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>unpack-jetty-ee10-demo-container-initializer</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-container-initializer</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/</outputDirectory>
<destFileName>jetty-ee10-demo-container-initializer.jar</destFileName>
</artifactItem>
</artifactItems>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
<execution>
<id>unpack-jetty-ee10-demo-web-fragment</id>
<phase>process-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-web-fragment</artifactId>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/</outputDirectory>
<destFileName>jetty-ee10-demo-web-fragment.jar</destFileName>
</artifactItem>
</artifactItems>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>

View File

@ -118,13 +118,22 @@ public class SpecWebAppTest
private void copyDependency(String depName, Path libDir) throws IOException private void copyDependency(String depName, Path libDir) throws IOException
{ {
// sinply use copy:dependency from maven...
Path targetDir = MavenPaths.projectBase().resolve("target");
Path jarFile = targetDir.resolve(depName + ".jar");
if (Files.exists(jarFile))
{
Files.copy(jarFile, libDir.resolve(depName + ".jar"));
return;
}
Path depPath = MavenPaths.projectBase().resolve("../" + depName).normalize(); Path depPath = MavenPaths.projectBase().resolve("../" + depName).normalize();
if (!Files.isDirectory(depPath)) if (!Files.isDirectory(depPath))
fail("Dependency not found: " + depPath); fail("Dependency not found: " + depPath);
Path outputJar = libDir.resolve(depName + ".jar"); Path outputJar = libDir.resolve(depName + ".jar");
Map<String, String> env = new HashMap<>(); Map<String, String> env = new HashMap<>();
env.put("create", "true"); env.put("create", "true");
URI uri = URI.create("jar:" + outputJar.toUri().toASCIIString()); URI uri = URI.create("jar:" + outputJar.toUri().toASCIIString());
try (FileSystem fs = FileSystems.newFileSystem(uri, env)) try (FileSystem fs = FileSystems.newFileSystem(uri, env))
{ {

View File

@ -44,8 +44,6 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<scriptVariables> <scriptVariables>
<maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version> <maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version>
</scriptVariables> </scriptVariables>

View File

@ -87,6 +87,33 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-home</artifactId>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>${jettyHomeZipFileName}</destFileName>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId> <artifactId>maven-invoker-plugin</artifactId>
@ -102,10 +129,16 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<extraArtifacts>
<extraArtifact>org.eclipse.jetty:jetty-slf4j-impl:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty.ee10:jetty-ee10-apache-jsp:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty.ee10:jetty-ee10-glassfish-jstl:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty.ee10:jetty-ee10-webapp:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty:jetty-server:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty:jetty-deploy:${project.version}</extraArtifact>
<extraArtifact>org.eclipse.jetty:jetty-home:${project.version}:zip</extraArtifact>
</extraArtifacts>
<junitPackageName>org.eclipse.jetty.maven.its.ee10</junitPackageName> <junitPackageName>org.eclipse.jetty.maven.its.ee10</junitPackageName>
<streamLogsOnFailures>true</streamLogsOnFailures>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<setupIncludes> <setupIncludes>
<setupInclude>it-parent-pom/pom.xml</setupInclude> <setupInclude>it-parent-pom/pom.xml</setupInclude>
</setupIncludes> </setupIncludes>
@ -121,8 +154,9 @@
<jettyStopKey>${jetty.stopKey}</jettyStopKey> <jettyStopKey>${jetty.stopKey}</jettyStopKey>
<jettyStopPort>${jetty.stopPort}</jettyStopPort> <jettyStopPort>${jetty.stopPort}</jettyStopPort>
<maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version> <maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version>
<localRepoPath>${localRepoPath}</localRepoPath>
<jettyHomeZip>${jettyHomeZip}</jettyHomeZip>
</scriptVariables> </scriptVariables>
<settingsFile>src/it/settings.xml</settingsFile>
<goals> <goals>
<goal>clean</goal> <goal>clean</goal>
</goals> </goals>

View File

@ -72,9 +72,9 @@
<artifactId>jetty-ee10-maven-plugin</artifactId> <artifactId>jetty-ee10-maven-plugin</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-slf4j-impl</artifactId> <artifactId>jetty-slf4j-impl</artifactId>
<version>${jetty.version}</version> <version>${jetty.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
<executions> <executions>

View File

@ -113,14 +113,15 @@
</goals> </goals>
<configuration> <configuration>
<jettyBase>${basedir}/src/base</jettyBase> <jettyBase>${basedir}/src/base</jettyBase>
<javaPath>${java.home}/bin/java</javaPath>
<jettyProperties> <jettyProperties>
<jetty.server.dumpAfterStart>true</jetty.server.dumpAfterStart> <jetty.server.dumpAfterStart>true</jetty.server.dumpAfterStart>
<jetty.port.file>${jetty.port.file}</jetty.port.file> <jetty.port.file>${jetty.port.file}</jetty.port.file>
<jetty.http.port>0</jetty.http.port> <jetty.http.port>0</jetty.http.port>
<maven.local.repo>@localRepoPath@</maven.local.repo>
</jettyProperties> </jettyProperties>
<modules>ee10-apache-jsp,ee10-glassfish-jstl,ee10-testmod,resources</modules> <modules>ee10-apache-jsp,ee10-glassfish-jstl,ee10-testmod,resources</modules>
<jettyOptions>--debug</jettyOptions> <jettyOptions>--debug</jettyOptions>
<jettyHomeZip>@jettyHomeZip@</jettyHomeZip>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

View File

@ -136,6 +136,7 @@
<jetty.port.file>${jetty.port.file}</jetty.port.file> <jetty.port.file>${jetty.port.file}</jetty.port.file>
<jetty.http.port>0</jetty.http.port> <jetty.http.port>0</jetty.http.port>
</jettyProperties> </jettyProperties>
<jettyHomeZip>@jettyHomeZip@</jettyHomeZip>
<modules>ee10-apache-jsp,ee10-glassfish-jstl,ee10-testmod,resources</modules> <modules>ee10-apache-jsp,ee10-glassfish-jstl,ee10-testmod,resources</modules>
</configuration> </configuration>
</execution> </execution>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<settings> <settings>
<localRepository>@localRepoPath@</localRepository>
<profiles> <profiles>
<profile> <profile>
<id>it-repo</id> <id>it-repo</id>

View File

@ -306,6 +306,12 @@ public abstract class AbstractWebAppMojo extends AbstractMojo
*/ */
@Parameter @Parameter
protected File jettyHome; protected File jettyHome;
/**
* Location of Jetty home zipped
*/
@Parameter
public File jettyHomeZip;
/** /**
* Location of jetty base directory * Location of jetty base directory
@ -555,7 +561,7 @@ public abstract class AbstractWebAppMojo extends AbstractMojo
jetty.setContextXml(contextXml); jetty.setContextXml(contextXml);
if (jettyHome == null) if (jettyHome == null)
jetty.setJettyHomeZip(mavenProjectHelper.resolveArtifact(JETTY_HOME_GROUPID, JETTY_HOME_ARTIFACTID, plugin.getVersion(), "zip")); jetty.setJettyHomeZip(jettyHomeZip != null ? jettyHomeZip : mavenProjectHelper.resolveArtifact(JETTY_HOME_GROUPID, JETTY_HOME_ARTIFACTID, plugin.getVersion(), "zip"));
jetty.version = plugin.getVersion(); jetty.version = plugin.getVersion();
jetty.setJettyHome(jettyHome); jetty.setJettyHome(jettyHome);

View File

@ -186,7 +186,7 @@ public class JettyHomeForker extends AbstractForker
//add any args to the jvm //add any args to the jvm
if (StringUtil.isNotBlank(jvmArgs)) if (StringUtil.isNotBlank(jvmArgs))
{ {
Arrays.stream(jvmArgs.split(" ")).filter(a -> StringUtil.isNotBlank(a)).forEach((a) -> cmd.add(a.trim())); Arrays.stream(jvmArgs.split(" ")).filter(StringUtil::isNotBlank).forEach((a) -> cmd.add(a.trim()));
} }
cmd.add("-jar"); cmd.add("-jar");
@ -225,7 +225,7 @@ public class JettyHomeForker extends AbstractForker
//put any other jetty options onto the command line //put any other jetty options onto the command line
if (StringUtil.isNotBlank(jettyOptions)) if (StringUtil.isNotBlank(jettyOptions))
{ {
Arrays.stream(jettyOptions.split(" ")).filter(a -> StringUtil.isNotBlank(a)).forEach((a) -> cmd.add(a.trim())); Arrays.stream(jettyOptions.split(" ")).filter(StringUtil::isNotBlank).forEach((a) -> cmd.add(a.trim()));
} }
//put any jetty properties onto the command line //put any jetty properties onto the command line

View File

@ -387,6 +387,13 @@
<classifier>webbundle</classifier> <classifier>webbundle</classifier>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-jetty-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee10.demos</groupId> <groupId>org.eclipse.jetty.ee10.demos</groupId>
<artifactId>jetty-ee10-demo-jetty-webapp</artifactId> <artifactId>jetty-ee10-demo-jetty-webapp</artifactId>
@ -505,7 +512,7 @@
<configuration> <configuration>
<skipTests>${skipTests}</skipTests> <skipTests>${skipTests}</skipTests>
<systemPropertyVariables> <systemPropertyVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath> <settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath>
</systemPropertyVariables> </systemPropertyVariables>
<argLine>-Dconscrypt-version=${conscrypt.version}</argLine> <argLine>-Dconscrypt-version=${conscrypt.version}</argLine>

View File

@ -45,8 +45,6 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<scriptVariables> <scriptVariables>
<maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version> <maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version>
</scriptVariables> </scriptVariables>

View File

@ -102,8 +102,6 @@
</executions> </executions>
<configuration> <configuration>
<junitPackageName>org.eclipse.jetty.maven.its.ee8</junitPackageName> <junitPackageName>org.eclipse.jetty.maven.its.ee8</junitPackageName>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<setupIncludes> <setupIncludes>
<setupInclude>it-parent-pom/pom.xml</setupInclude> <setupInclude>it-parent-pom/pom.xml</setupInclude>
</setupIncludes> </setupIncludes>

View File

@ -126,18 +126,36 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
--> -->
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jndi-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId> <groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jsp-webapp</artifactId> <artifactId>jetty-ee9-demo-jsp-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-simple-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId> <groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-spec-webapp</artifactId> <artifactId>jetty-ee9-demo-spec-webapp</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-async-rest-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
@ -146,8 +164,12 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<environmentVariables> <environmentVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <jettyVersion>${project.version}</jettyVersion>
</environmentVariables> </environmentVariables>
<systemPropertyVariables>
<mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<jettyVersion>${project.version}</jettyVersion>
</systemPropertyVariables>
<useManifestOnlyJar>false</useManifestOnlyJar> <useManifestOnlyJar>false</useManifestOnlyJar>
</configuration> </configuration>
</plugin> </plugin>

View File

@ -34,7 +34,7 @@ public class JettyDemos
{ {
private static final Logger LOG = LoggerFactory.getLogger(JettyDemos.class); private static final Logger LOG = LoggerFactory.getLogger(JettyDemos.class);
private static final Path JETTY_DEMOS_DIR; private static final Path JETTY_DEMOS_DIR;
private static final String VERSION; private static String VERSION = System.getProperty("jettyVersion", "unknown");
static static
{ {
@ -71,29 +71,27 @@ public class JettyDemos
LOG.warn("Unable to resolve Jetty Demos location", th); LOG.warn("Unable to resolve Jetty Demos location", th);
} }
} }
JETTY_DEMOS_DIR = demosDir; JETTY_DEMOS_DIR = demosDir;
String version = "unknown"; String version = "unknown";
Path pomFile = demosDir.resolve("pom.xml"); if (version.equals(VERSION))
try (Stream<String> lineStream = Files.lines(pomFile))
{ {
String versionLine = lineStream Path pomFile = demosDir.resolve("pom.xml");
.filter((line) -> line.contains("<version>")) try (Stream<String> lineStream = Files.lines(pomFile))
.findFirst() {
.orElseThrow(() -> String versionLine = lineStream
{ .filter((line) -> line.contains("<version>"))
throw new RuntimeException("Unable to find <version> in " + pomFile); .findFirst()
}); .orElseThrow(() -> new RuntimeException("Unable to find <version> in " + pomFile));
version = versionLine.replaceAll("<[^>]*>", "").trim(); version = versionLine.replaceAll("<[^>]*>", "").trim();
} }
catch (IOException e) catch (IOException e)
{ {
LOG.warn("Unable to find <version> in " + pomFile, e); LOG.warn("Unable to find <version> in " + pomFile, e);
} }
VERSION = version; VERSION = version;
}
} }
private static Path asDirectory(String path) private static Path asDirectory(String path)
@ -141,6 +139,33 @@ public class JettyDemos
return JETTY_DEMOS_DIR; return JETTY_DEMOS_DIR;
} }
public static Path find(String path, MavenCoordinate mavenCoordinate) throws FileNotFoundException
{
try
{
return find(path);
}
catch (FileNotFoundException e)
{
//could be not in the target directory if restored from build cache
// but as the build always runs install the artifact should be there in local repository
}
//.repository/org/eclipse/jetty/ee9/demos/jetty-ee9-demo-jndi-webapp/12.0.0-SNAPSHOT/jetty-ee9-demo-jndi-webapp-12.0.0-SNAPSHOT.war
String version = mavenCoordinate.version().isEmpty() ? VERSION : mavenCoordinate.version();
Path result = Paths.get(System.getProperty("mavenRepoPath", System.getProperty("user.home") + "/.m2/repository"),
mavenCoordinate.groupId().replaceAll("\\.", "/"),
mavenCoordinate.artifactId(),
version,
mavenCoordinate.artifactId() + "-" + version + "." + mavenCoordinate.packaging()
);
if (!Files.exists(result))
{
throw new FileNotFoundException(result.toString());
}
return result;
}
@Deprecated
public static Path find(String path) throws FileNotFoundException public static Path find(String path) throws FileNotFoundException
{ {
String expandedPath = path.replaceAll("@VER@", VERSION); String expandedPath = path.replaceAll("@VER@", VERSION);
@ -152,8 +177,11 @@ public class JettyDemos
return result; return result;
} }
public record MavenCoordinate(String groupId, String artifactId, String version, String packaging){}
public static void main(String... arg) public static void main(String... arg)
{ {
System.err.println("Jetty Demos Dir is " + JETTY_DEMOS_DIR); System.err.println("Jetty Demos Dir is " + JETTY_DEMOS_DIR);
} }
} }

View File

@ -39,7 +39,9 @@ public class OneWebApp
// PlusConfiguration) to choosing where the webapp will unpack itself. // PlusConfiguration) to choosing where the webapp will unpack itself.
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("jetty-ee9-demo-async-rest/jetty-ee9-demo-async-rest-webapp/target/jetty-ee9-demo-async-rest-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee9.demos",
"jetty-ee9-demo-async-rest-webapp", "", "war");
Path warFile = JettyDemos.find("jetty-ee9-demo-async-rest/jetty-ee9-demo-async-rest-webapp/target/jetty-ee9-demo-async-rest-webapp-@VER@.war", mavenCoordinate);
webapp.setWar(warFile.toString()); webapp.setWar(warFile.toString());
// A WebAppContext is a ContextHandler as well so it needs to be set to // A WebAppContext is a ContextHandler as well so it needs to be set to

View File

@ -44,7 +44,9 @@ public class OneWebAppWithJsp
// the webapp will unpack itself. // the webapp will unpack itself.
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("jetty-ee9-demo-jsp-webapp/target/jetty-ee9-demo-jsp-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee9.demos",
"jetty-ee9-demo-jsp-webapp", "", "war");
Path warFile = JettyDemos.find("jetty-ee9-demo-jsp-webapp/target/jetty-ee9-demo-jsp-webapp-@VER@.war", mavenCoordinate);
webapp.setWarResource(webapp.getResourceFactory().newResource(warFile)); webapp.setWarResource(webapp.getResourceFactory().newResource(warFile));
webapp.setExtractWAR(true); webapp.setExtractWAR(true);

View File

@ -45,7 +45,9 @@ public class ServerWithAnnotations
webapp.addConfiguration(new EnvConfiguration(), new PlusConfiguration(), new AnnotationConfiguration()); webapp.addConfiguration(new EnvConfiguration(), new PlusConfiguration(), new AnnotationConfiguration());
webapp.setContextPath("/"); webapp.setContextPath("/");
Path warFile = JettyDemos.find("jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/target/jetty-ee9-demo-spec-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee9.demos",
"jetty-ee9-demo-spec-webapp", "", "war");
Path warFile = JettyDemos.find("jetty-ee9-demo-spec/jetty-ee9-demo-spec-webapp/target/jetty-ee9-demo-spec-webapp-@VER@.war", mavenCoordinate);
webapp.setWar(warFile.toString()); webapp.setWar(warFile.toString());
webapp.setAttribute( webapp.setAttribute(

View File

@ -35,7 +35,9 @@ public class ServerWithJNDI
// Create a WebApp // Create a WebApp
WebAppContext webapp = new WebAppContext(); WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/"); webapp.setContextPath("/");
Path testJndiWar = JettyDemos.find("jetty-ee9-demo-jndi-webapp/target/jetty-ee9-demo-jndi-webapp-@VER@.war"); JettyDemos.MavenCoordinate mavenCoordinate = new JettyDemos.MavenCoordinate("org.eclipse.jetty.ee9.demos",
"jetty-ee9-demo-jndi-webapp", "", "war");
Path testJndiWar = JettyDemos.find("jetty-ee9-demo-jndi-webapp/target/jetty-ee9-demo-jndi-webapp-@VER@.war", mavenCoordinate);
webapp.setWarResource(webapp.getResourceFactory().newResource(testJndiWar)); webapp.setWarResource(webapp.getResourceFactory().newResource(testJndiWar));
server.setHandler(webapp); server.setHandler(webapp);

View File

@ -44,8 +44,6 @@
</execution> </execution>
</executions> </executions>
<configuration> <configuration>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<scriptVariables> <scriptVariables>
<maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version> <maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version>
</scriptVariables> </scriptVariables>

View File

@ -75,6 +75,33 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-home</artifactId>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>${jettyHomeZipFileName}</destFileName>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
@ -102,8 +129,6 @@
</executions> </executions>
<configuration> <configuration>
<junitPackageName>org.eclipse.jetty.maven.its.ee9</junitPackageName> <junitPackageName>org.eclipse.jetty.maven.its.ee9</junitPackageName>
<addTestClassPath>true</addTestClassPath>
<ignoreFailures>true</ignoreFailures>
<setupIncludes> <setupIncludes>
<setupInclude>it-parent-pom/pom.xml</setupInclude> <setupInclude>it-parent-pom/pom.xml</setupInclude>
</setupIncludes> </setupIncludes>
@ -122,8 +147,9 @@
<jettyStopPort>${jetty.stopPort}</jettyStopPort> <jettyStopPort>${jetty.stopPort}</jettyStopPort>
<maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version> <maven.surefire.plugin.version>${maven.surefire.plugin.version}</maven.surefire.plugin.version>
<servletApiVersion>${jetty.servlet.api.version}</servletApiVersion> <servletApiVersion>${jetty.servlet.api.version}</servletApiVersion>
<localRepoPath>${localRepoPath}</localRepoPath>
<jettyHomeZip>${jettyHomeZip}</jettyHomeZip>
</scriptVariables> </scriptVariables>
<settingsFile>src/it/settings.xml</settingsFile>
<goals> <goals>
<goal>clean</goal> <goal>clean</goal>
</goals> </goals>

View File

@ -305,6 +305,12 @@ public abstract class AbstractWebAppMojo extends AbstractMojo
*/ */
@Parameter @Parameter
protected File jettyHome; protected File jettyHome;
/**
* Location of Jetty home zipped
*/
@Parameter
public File jettyHomeZip;
/** /**
* Location of jetty base directory * Location of jetty base directory
@ -554,7 +560,7 @@ public abstract class AbstractWebAppMojo extends AbstractMojo
jetty.setContextXml(contextXml); jetty.setContextXml(contextXml);
if (jettyHome == null) if (jettyHome == null)
jetty.setJettyHomeZip(mavenProjectHelper.resolveArtifact(JETTY_HOME_GROUPID, JETTY_HOME_ARTIFACTID, plugin.getVersion(), "zip")); jetty.setJettyHomeZip(jettyHomeZip != null ? jettyHomeZip : mavenProjectHelper.resolveArtifact(JETTY_HOME_GROUPID, JETTY_HOME_ARTIFACTID, plugin.getVersion(), "zip"));
jetty.version = plugin.getVersion(); jetty.version = plugin.getVersion();
jetty.setJettyHome(jettyHome); jetty.setJettyHome(jettyHome);

View File

@ -383,6 +383,13 @@
<classifier>webbundle</classifier> <classifier>webbundle</classifier>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jetty-webapp</artifactId>
<version>${project.version}</version>
<type>war</type>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty.ee9.demos</groupId> <groupId>org.eclipse.jetty.ee9.demos</groupId>
<artifactId>jetty-ee9-demo-jetty-webapp</artifactId> <artifactId>jetty-ee9-demo-jetty-webapp</artifactId>
@ -501,7 +508,7 @@
<configuration> <configuration>
<skipTests>${skipTests}</skipTests> <skipTests>${skipTests}</skipTests>
<systemPropertyVariables> <systemPropertyVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath> <settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath>
</systemPropertyVariables> </systemPropertyVariables>
<argLine>-Dconscrypt-version=${conscrypt.version}</argLine> <argLine>-Dconscrypt-version=${conscrypt.version}</argLine>

35
pom.xml
View File

@ -107,6 +107,7 @@
<mariadb.version>3.1.4</mariadb.version> <mariadb.version>3.1.4</mariadb.version>
<mariadb.docker.version>10.3.6</mariadb.docker.version> <mariadb.docker.version>10.3.6</mariadb.docker.version>
<maven.deps.version>3.9.0</maven.deps.version> <maven.deps.version>3.9.0</maven.deps.version>
<maven-build-cache.version>1.0.1</maven-build-cache.version>
<maven-artifact-transfer.version>0.13.1</maven-artifact-transfer.version> <maven-artifact-transfer.version>0.13.1</maven-artifact-transfer.version>
<maven.resolver.version>1.9.15</maven.resolver.version> <maven.resolver.version>1.9.15</maven.resolver.version>
<maven.version>3.9.0</maven.version> <maven.version>3.9.0</maven.version>
@ -191,6 +192,8 @@
<invoker.mergeUserSettings>false</invoker.mergeUserSettings> <invoker.mergeUserSettings>false</invoker.mergeUserSettings>
<it.debug>false</it.debug> <it.debug>false</it.debug>
<localRepoPath>${project.build.directory}/local-repo</localRepoPath> <localRepoPath>${project.build.directory}/local-repo</localRepoPath>
<jettyHomeZipFileName>jetty-home.zip</jettyHomeZipFileName>
<jettyHomeZip>${project.build.directory}/${jettyHomeZipFileName}</jettyHomeZip>
<jetty.surefire.argLine>-Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -Djava.io.tmpdir=${project.build.directory} -showversion -Xmx6g -Xms4g -Xlog:gc:stderr:time,level,tags</jetty.surefire.argLine> <jetty.surefire.argLine>-Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -Djava.io.tmpdir=${project.build.directory} -showversion -Xmx6g -Xms4g -Xlog:gc:stderr:time,level,tags</jetty.surefire.argLine>
<jetty.testtracker.log>true</jetty.testtracker.log> <jetty.testtracker.log>true</jetty.testtracker.log>
<jetty.unixdomain.dir>/tmp</jetty.unixdomain.dir> <jetty.unixdomain.dir>/tmp</jetty.unixdomain.dir>
@ -201,6 +204,8 @@
<!-- if changing this version please update default in RemoteInfinispanTestSupport you will get thanks from Eclipse IDE users --> <!-- if changing this version please update default in RemoteInfinispanTestSupport you will get thanks from Eclipse IDE users -->
<!-- but hey we have no more strange people?? :P --> <!-- but hey we have no more strange people?? :P -->
<infinispan.docker.image.version>11.0.14.Final</infinispan.docker.image.version> <infinispan.docker.image.version>11.0.14.Final</infinispan.docker.image.version>
<project.build.outputTimestamp>2023-06-05T23:12:49Z</project.build.outputTimestamp>
</properties> </properties>
<licenses> <licenses>
@ -235,6 +240,13 @@
</modules> </modules>
<build> <build>
<extensions>
<extension>
<groupId>org.apache.maven.extensions</groupId>
<artifactId>maven-build-cache-extension</artifactId>
<version>${maven-build-cache.version}</version>
</extension>
</extensions>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
@ -275,8 +287,8 @@
<configuration> <configuration>
<rules> <rules>
<requireMavenVersion> <requireMavenVersion>
<version>[3.8.4,)</version> <version>[3.9.2,)</version>
<message>[ERROR] OLD MAVEN [${maven.version}] in use, Jetty ${project.version} requires Maven 3.8.4 or newer</message> <message>[ERROR] OLD MAVEN [${maven.version}] in use, Jetty ${project.version} requires Maven 3.9.2 or newer</message>
</requireMavenVersion> </requireMavenVersion>
<requireJavaVersion> <requireJavaVersion>
<version>[17,)</version> <version>[17,)</version>
@ -613,6 +625,7 @@
<artifactId>maven-invoker-plugin</artifactId> <artifactId>maven-invoker-plugin</artifactId>
<version>${maven.invoker.plugin.version}</version> <version>${maven.invoker.plugin.version}</version>
<configuration> <configuration>
<addTestClassPath>true</addTestClassPath>
<mergeUserSettings>${invoker.mergeUserSettings}</mergeUserSettings> <mergeUserSettings>${invoker.mergeUserSettings}</mergeUserSettings>
<writeJunitReport>true</writeJunitReport> <writeJunitReport>true</writeJunitReport>
<junitPackageName>org.eclipse.jetty.maven.its</junitPackageName> <junitPackageName>org.eclipse.jetty.maven.its</junitPackageName>
@ -626,8 +639,8 @@
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${localRepoPath}</localRepositoryPath> <localRepositoryPath>${localRepoPath}</localRepositoryPath>
<settingsFile>${settingsPath}</settingsFile> <settingsFile>${settingsPath}</settingsFile>
<ignoreFailures>true</ignoreFailures>
<skipInvocation>${skipTests}</skipInvocation> <skipInvocation>${skipTests}</skipInvocation>
<streamLogsOnFailures>true</streamLogsOnFailures>
<pomIncludes> <pomIncludes>
<pomInclude>*/pom.xml</pomInclude> <pomInclude>*/pom.xml</pomInclude>
</pomIncludes> </pomIncludes>
@ -2041,7 +2054,6 @@
<id>ci</id> <id>ci</id>
<properties> <properties>
<surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount> <surefire.rerunFailingTestsCount>0</surefire.rerunFailingTestsCount>
<settingsPath>${env.GLOBAL_MVN_SETTINGS}</settingsPath>
<spotbugs.failOnError>false</spotbugs.failOnError> <spotbugs.failOnError>false</spotbugs.failOnError>
<!-- Defines a SpotBugs threshold. Use "Low" to discover low-priority bugs --> <!-- Defines a SpotBugs threshold. Use "Low" to discover low-priority bugs -->
<spotbugs.threshold>Medium</spotbugs.threshold> <spotbugs.threshold>Medium</spotbugs.threshold>
@ -2049,7 +2061,8 @@
<spotbugs.effort>Default</spotbugs.effort> <spotbugs.effort>Default</spotbugs.effort>
<spotbugs.skip>false</spotbugs.skip> <spotbugs.skip>false</spotbugs.skip>
<spotbugs.onlyAnalyze>org.eclipse.jetty.*</spotbugs.onlyAnalyze> <spotbugs.onlyAnalyze>org.eclipse.jetty.*</spotbugs.onlyAnalyze>
<maven.repo.uri></maven.repo.uri> <!-- need a good default value if running this profile locally with empty repo -->
<maven.repo.uri>https://repo.maven.apache.org/maven2/</maven.repo.uri>
<home.start.timeout>120</home.start.timeout> <home.start.timeout>120</home.start.timeout>
</properties> </properties>
<modules> <modules>
@ -2081,6 +2094,18 @@
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>com.github.spotbugs</groupId> <groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId> <artifactId>spotbugs-maven-plugin</artifactId>

View File

@ -103,7 +103,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<systemPropertyVariables> <systemPropertyVariables>
<mavenRepoPath>${settings.localRepository}</mavenRepoPath> <mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<jettyVersion>${project.version}</jettyVersion> <jettyVersion>${project.version}</jettyVersion>
<hazelcast.version>${hazelcast.version}</hazelcast.version> <hazelcast.version>${hazelcast.version}</hazelcast.version>
<mariadb.docker.version>${mariadb.docker.version}</mariadb.docker.version> <mariadb.docker.version>${mariadb.docker.version}</mariadb.docker.version>