From ad5f7a141f3779b7e4571619d94075496fdddff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Diga=C5=88a?= Date: Sat, 1 Jan 2022 23:01:56 +0100 Subject: [PATCH 1/2] [SUREFIRE-1972] Use current version of surefire-shared-utils --- .github/workflows/maven-verify.yml | 6 ++-- maven-failsafe-plugin/pom.xml | 2 +- maven-surefire-common/pom.xml | 2 +- pom.xml | 16 +++++++-- surefire-api/pom.xml | 2 +- surefire-booter/pom.xml | 3 +- .../surefire/booter/NewClassLoaderRunner.java | 15 ++++---- surefire-extensions-api/pom.xml | 2 +- surefire-its/pom.xml | 2 +- surefire-providers/common-java5/pom.xml | 2 +- surefire-report-parser/pom.xml | 2 +- surefire-shared-utils/pom.xml | 36 +++++++++++++++++-- 12 files changed, 67 insertions(+), 23 deletions(-) diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index 78c09f5461..b4edbcca1a 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -26,8 +26,10 @@ jobs: name: Verify uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v2 with: - ff-goal: 'install' - verify-goal: 'install -P run-its' + ff-goal: 'clean install -nsu -P run-its' + ff-site-goal: 'clean install site -nsu -DskipTests -P reporting' + verify-goal: 'clean install -nsu -P run-its' + verify-site-goal: 'clean install site -nsu -DskipTests -P reporting' verify-fail-fast: false failure-upload-path: | surefire-its/target/*/log.txt diff --git a/maven-failsafe-plugin/pom.xml b/maven-failsafe-plugin/pom.xml index df5b7b3b30..f777c7c1af 100644 --- a/maven-failsafe-plugin/pom.xml +++ b/maven-failsafe-plugin/pom.xml @@ -266,12 +266,12 @@ verify src/it/settings.xml ${skipTests} - true true ${failsafe-integration-test-port} ${failsafe-integration-test-stop-port} + true diff --git a/maven-surefire-common/pom.xml b/maven-surefire-common/pom.xml index 805b24769f..9e178a6e68 100644 --- a/maven-surefire-common/pom.xml +++ b/maven-surefire-common/pom.xml @@ -74,7 +74,7 @@ org.apache.maven.surefire surefire-shared-utils - 3.0.0-M4 + ${surefire-shared-utils.version} com.google.code.findbugs diff --git a/pom.xml b/pom.xml index da1084ae87..3a791c5db5 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,7 @@ + surefire-shared-utils surefire-logger-api surefire-api surefire-extensions-api @@ -62,7 +63,6 @@ maven-failsafe-plugin maven-surefire-report-plugin surefire-its - surefire-shared-utils @@ -101,6 +101,7 @@ 2.0.9 3.6.2 0.8.7 + ${project.version} scm:git:https://gitbox.apache.org/repos/asf/maven-surefire.git surefire-archives/surefire-LATEST 1.${javaVersion} @@ -687,7 +688,17 @@ - + + + ide-development + + 3-SNAPSHOT + + jdk9+ @@ -697,7 +708,6 @@ --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED --add-opens java.base/sun.nio.cs=ALL-UNNAMED --add-opens java.base/java.nio.file=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED - reporting diff --git a/surefire-api/pom.xml b/surefire-api/pom.xml index 158c88a8cd..4452a22d39 100644 --- a/surefire-api/pom.xml +++ b/surefire-api/pom.xml @@ -40,7 +40,7 @@ org.apache.maven.surefire surefire-shared-utils - 3.0.0-M4 + ${surefire-shared-utils.version} com.google.code.findbugs diff --git a/surefire-booter/pom.xml b/surefire-booter/pom.xml index db7e3d02fc..84dd9267ad 100644 --- a/surefire-booter/pom.xml +++ b/surefire-booter/pom.xml @@ -115,11 +115,12 @@ maven-surefire-plugin + 3.0.0-M3 org.apache.maven.surefire surefire-shadefire - 3.0.0-M4 + 3.0.0-M3 diff --git a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java index 154a87ea88..ecc997d97d 100644 --- a/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java +++ b/surefire-booter/src/test/java/org/apache/maven/surefire/booter/NewClassLoaderRunner.java @@ -56,6 +56,8 @@ public class NewClassLoaderRunner extends BlockJUnit4ClassRunner { + private static final String PROJECT_DIR = System.getProperty( "java.dir" ); + private Class cls; public NewClassLoaderRunner( Class clazz ) @@ -236,17 +238,14 @@ private static Collection toPathList() Collection classPath = new HashSet<>(); try { - String[] files = FileUtils.fileRead( new File( "target/test-classpath/cp.txt" ), "UTF-8" ) - .split( pathSeparator ); + File classPathFile = new File( PROJECT_DIR, "target/test-classpath/cp.txt" ); + String[] files = FileUtils.fileRead( classPathFile, "UTF-8" ).split( pathSeparator ); for ( String file : files ) { - File f = new File( file ); - File dir = f.getParentFile(); - classPath.add( - ( dir.getName().equals( "target" ) ? new File( dir, "classes" ) : f ).toURI().toURL() ); + classPath.add( new File( file ).toURI().toURL() ); } - classPath.add( new File( "target/classes" ).toURI().toURL() ); - classPath.add( new File( "target/test-classes" ).toURI().toURL() ); + classPath.add( new File( PROJECT_DIR, "target/classes" ).toURI().toURL() ); + classPath.add( new File( PROJECT_DIR, "target/test-classes" ).toURI().toURL() ); } catch ( IOException e ) { diff --git a/surefire-extensions-api/pom.xml b/surefire-extensions-api/pom.xml index ee086111df..d16347fddb 100644 --- a/surefire-extensions-api/pom.xml +++ b/surefire-extensions-api/pom.xml @@ -45,7 +45,7 @@ org.apache.maven.surefire surefire-shared-utils - 3.0.0-M4 + ${surefire-shared-utils.version} org.mockito diff --git a/surefire-its/pom.xml b/surefire-its/pom.xml index 3f9213e107..5a647d6c61 100644 --- a/surefire-its/pom.xml +++ b/surefire-its/pom.xml @@ -40,7 +40,7 @@ org.apache.maven.surefire surefire-report-parser - ${project.version} + 3.0.0-M5 test diff --git a/surefire-providers/common-java5/pom.xml b/surefire-providers/common-java5/pom.xml index f76659e361..90626116b6 100644 --- a/surefire-providers/common-java5/pom.xml +++ b/surefire-providers/common-java5/pom.xml @@ -35,7 +35,7 @@ org.apache.maven.surefire surefire-shared-utils - 3.0.0-M4 + ${surefire-shared-utils.version} diff --git a/surefire-report-parser/pom.xml b/surefire-report-parser/pom.xml index b452bd701c..c8304293bc 100644 --- a/surefire-report-parser/pom.xml +++ b/surefire-report-parser/pom.xml @@ -41,7 +41,7 @@ org.apache.maven.surefire surefire-shared-utils - 3.0.0-M4 + ${surefire-shared-utils.version} org.apache.maven.reporting diff --git a/surefire-shared-utils/pom.xml b/surefire-shared-utils/pom.xml index c845f5c4d1..b28d3c25fd 100644 --- a/surefire-shared-utils/pom.xml +++ b/surefire-shared-utils/pom.xml @@ -29,7 +29,9 @@ surefire-shared-utils Surefire Shared Utils - Relocated Java packages of maven-shared-utils in Surefire + + Relocated Java packages of maven-shared-utils and several Apache Commons utilities in Surefire. + @@ -100,5 +102,35 @@ - + + + + ide-development + + + + maven-install-plugin + + + install-devel-jar + install + + install-file + + + surefire-shared-utils + 3-SNAPSHOT + target/${project.build.finalName}.jar + + + + + + + + From cee232ddf52f3aa0486dbcd5c1fcb1335d096085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Diga=C5=88a?= Date: Tue, 18 Jan 2022 01:11:55 +0100 Subject: [PATCH 2/2] [github] max-parallel: 4, timeout-minutes: 7 hours --- .github/workflows/maven-verify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index b4edbcca1a..3e89f82c4d 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -35,3 +35,5 @@ jobs: surefire-its/target/*/log.txt surefire-its/target/**/surefire-reports/* surefire-its/target/**/failsafe-reports/* + max-parallel: 4 + timeout-minutes: 420