This is an automated email from the ASF dual-hosted git repository. tibordigana pushed a commit to branch release/2.22.3 in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/release/2.22.3 by this push: new 090f098 JDK 18 support 090f098 is described below commit 090f098515968ad9cf0fab38b0e7ecf84280605a Author: tibordigana <tibordig...@apache.org> AuthorDate: Fri Apr 1 23:42:15 2022 +0200 JDK 18 support --- Jenkinsfile | 6 ++--- README.md | 4 +-- .../src/it/jetty-war-test-failing/pom.xml | 9 +++++++ .../src/it/jetty-war-test-passing/pom.xml | 9 +++++++ .../src/it/multiple-summaries-failing/pom.xml | 4 +-- .../src/it/multiple-summaries/pom.xml | 4 +-- .../src/it/working-directory/pom.xml | 4 +-- pom.xml | 3 ++- .../maven/surefire/its/fixture/MavenLauncher.java | 16 ++++-------- surefire-its/src/test/resources/settings.xml | 29 ---------------------- 10 files changed, 36 insertions(+), 52 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c97ac91..d201090 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,8 +31,8 @@ properties( ) final def oses = ['linux':'ubuntu', 'windows':'windows-he'] -final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.5.x'] : ['3.5.x'] -final def jdks = [7, 8, 11] +final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.8.x'] : ['3.8.x'] +final def jdks = [7, 8, 11, 18] final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its'] final def goals = ['clean', 'install', 'jacoco:report'] @@ -71,7 +71,7 @@ oses.eachWithIndex { osMapping, indexOfOs -> def boolean makeReports = os == 'linux' && indexOfMaven == mavens.size() - 1 && jdk == 9 def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk def allOptions = options + ["-Dfailsafe-integration-test-port=${failsafeItPort}", "-Dfailsafe-integration-test-stop-port=${1 + failsafeItPort}"] - if (jdk == 11) { + if (jdk > 11) { allOptions += ['-DskipUnitTests=true'] } buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions, mavenOpts, makeReports) diff --git a/README.md b/README.md index 1fc5458..ddb1f63 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ But in order to run IT tests, you can do: **(on Linux/Unix)** *export MAVEN_OPTS="-server -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"* **(on Windows)** *set MAVEN_OPTS="-server -Xmx256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"* * In order to run the build with **JDK 9** **on Windows** (**on Linux/Unix modify system property jdk.home**): - *mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program Files\Java\jdk9\"* + *mvn install site site:stage -P reporting,run-its "-Djdk.home=/path/to/jdk9"* * In order to run the build with **JDK 10** disable JaCoCo due to a [bug in JaCoCo](https://github.com/jacoco/jacoco/issues/629) - *mvn install site site:stage -P reporting,run-its -Djacoco.skip=true "-Djdk.home=e:\Program Files\Java\jdk10\"* + *mvn install site site:stage -P reporting,run-its -Djacoco.skip=true "-Djdk.home=/path/to/jdk10"* ### Deploying web site diff --git a/maven-failsafe-plugin/src/it/jetty-war-test-failing/pom.xml b/maven-failsafe-plugin/src/it/jetty-war-test-failing/pom.xml index 193791d..79d2619 100644 --- a/maven-failsafe-plugin/src/it/jetty-war-test-failing/pom.xml +++ b/maven-failsafe-plugin/src/it/jetty-war-test-failing/pom.xml @@ -63,6 +63,15 @@ <directory>${basedir}/src/test/resources</directory> </testResource> </testResources> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>3.3.2</version> + </plugin> + </plugins> + </pluginManagement> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> diff --git a/maven-failsafe-plugin/src/it/jetty-war-test-passing/pom.xml b/maven-failsafe-plugin/src/it/jetty-war-test-passing/pom.xml index 31dc8ec..7e33bfd 100644 --- a/maven-failsafe-plugin/src/it/jetty-war-test-passing/pom.xml +++ b/maven-failsafe-plugin/src/it/jetty-war-test-passing/pom.xml @@ -63,6 +63,15 @@ <directory>${basedir}/src/test/resources</directory> </testResource> </testResources> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>3.3.2</version> + </plugin> + </plugins> + </pluginManagement> <plugins> <plugin> <groupId>org.eclipse.jetty</groupId> diff --git a/maven-failsafe-plugin/src/it/multiple-summaries-failing/pom.xml b/maven-failsafe-plugin/src/it/multiple-summaries-failing/pom.xml index aedbdde..af2df65 100644 --- a/maven-failsafe-plugin/src/it/multiple-summaries-failing/pom.xml +++ b/maven-failsafe-plugin/src/it/multiple-summaries-failing/pom.xml @@ -27,8 +27,8 @@ <name>Run tests multiple times</name> <properties> - <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.target>1.6</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> diff --git a/maven-failsafe-plugin/src/it/multiple-summaries/pom.xml b/maven-failsafe-plugin/src/it/multiple-summaries/pom.xml index d87409f..2c508f3 100644 --- a/maven-failsafe-plugin/src/it/multiple-summaries/pom.xml +++ b/maven-failsafe-plugin/src/it/multiple-summaries/pom.xml @@ -27,8 +27,8 @@ <name>Run tests multiple times</name> <properties> - <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.target>1.6</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> diff --git a/maven-failsafe-plugin/src/it/working-directory/pom.xml b/maven-failsafe-plugin/src/it/working-directory/pom.xml index 6cf2bc5..22d5034 100644 --- a/maven-failsafe-plugin/src/it/working-directory/pom.xml +++ b/maven-failsafe-plugin/src/it/working-directory/pom.xml @@ -27,8 +27,8 @@ <name>Run tests in a nonexistent working directory</name> <properties> - <maven.compiler.source>1.6</maven.compiler.source> - <maven.compiler.target>1.6</maven.compiler.target> + <maven.compiler.source>1.7</maven.compiler.source> + <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> diff --git a/pom.xml b/pom.xml index c00ce26..6968947 100644 --- a/pom.xml +++ b/pom.xml @@ -458,6 +458,7 @@ <artifactId>maven-surefire-plugin</artifactId> <version>2.12.4</version> <!-- ${shadedVersion}, but resolved due to https://issues.apache.org/jira/browse/MRELEASE-799 --> <configuration> + <skipTests>${skipUnitTests}</skipTests> <!-- NOTE: Be sure to isolate the Surefire version under test from the version running the tests! --> <useSystemClassLoader>false</useSystemClassLoader> <argLine>${jvm.args.tests} ${jacoco.agent} -Dnet.bytebuddy.experimental=true</argLine> @@ -486,7 +487,7 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> - <version>0.8.2</version> + <version>0.8.7</version> </plugin> </plugins> </pluginManagement> diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java index 1cbfb6b..eb6cf01 100755 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/fixture/MavenLauncher.java @@ -160,8 +160,10 @@ public final class MavenLauncher public OutputValidator getSubProjectValidator( String subProject ) throws VerificationException { - final File subFile = getValidator().getSubFile( subProject ); - return new OutputValidator( new Verifier( subFile.getAbsolutePath() ) ); + File subFile = getValidator().getSubFile( subProject ); + Verifier subProjectVerifier = new Verifier( subFile.getAbsolutePath() ); + subProjectVerifier.setLocalRepo( System.getProperty( "localRepository" ) ); + return new OutputValidator( subProjectVerifier ); } public MavenLauncher addEnvVar( String key, String value ) @@ -292,17 +294,10 @@ public final class MavenLauncher { try { - File generatedSettings = new File( System.getProperty( "maven.settings.file" ) ).getCanonicalFile(); - String generatedSettingsPath = generatedSettings.getAbsolutePath(); - addCliOption( "-s " + generatedSettingsPath ); getVerifier().setCliOptions( cliOptions ); getVerifier().executeGoals( goals, envvars ); return getValidator(); } - catch ( IOException e ) - { - throw new SurefireVerifierException( e.getLocalizedMessage(), e ); - } catch ( VerificationException e ) { throw new SurefireVerifierException( e.getLocalizedMessage(), e ); @@ -390,8 +385,7 @@ public final class MavenLauncher ? new Verifier( ensureUnpacked().getAbsolutePath(), null, false ) : new Verifier( ensureUnpacked().getAbsolutePath(), null, false, cli ); - verifier.getVerifierProperties() - .setProperty( "use.mavenRepoLocal", "false" ); + verifier.setLocalRepo( System.getProperty( "localRepository" ) ); } catch ( VerificationException e ) { diff --git a/surefire-its/src/test/resources/settings.xml b/surefire-its/src/test/resources/settings.xml deleted file mode 100644 index 69a1c2a..0000000 --- a/surefire-its/src/test/resources/settings.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one - ~ or more contributor license agreements. See the NOTICE file - ~ distributed with this work for additional information - ~ regarding copyright ownership. The ASF licenses this file - ~ to you under the Apache License, Version 2.0 (the - ~ "License"); you may not use this file except in compliance - ~ with the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, - ~ software distributed under the License is distributed on an - ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - ~ KIND, either express or implied. See the License for the - ~ specific language governing permissions and limitations - ~ under the License. - --> -<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> - <localRepository>${maven.repo.local}</localRepository> - <interactiveMode>false</interactiveMode> - <pluginGroups> - <pluginGroup>org.apache.maven.plugins</pluginGroup> - <pluginGroup>org.codehaus.mojo</pluginGroup> - </pluginGroups> -</settings>