This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch revert-MNG-6772 in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit 2d950c6f84123f3bdbb34f3f89a2942af9cb0a59 Author: rfscholte <[email protected]> AuthorDate: Fri Feb 5 16:35:23 2021 +0100 Make tests verifiable with at least Maven 3.6.3 --- .../MavenITmng5572ReactorPluginExtensionsTest.java | 9 +++++++- .../maven/it/MavenITmng5937MavenWrapper.java | 24 ++++++++++++++-------- ...ng6759TransitiveDependencyRepositoriesTest.java | 9 +++++++- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5572ReactorPluginExtensionsTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5572ReactorPluginExtensionsTest.java index f82ee8c..433ebc6 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5572ReactorPluginExtensionsTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5572ReactorPluginExtensionsTest.java @@ -61,7 +61,14 @@ public class MavenITmng5572ReactorPluginExtensionsTest verifier.setAutoclean( false ); verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); - verifier.verifyTextInLog( "[WARNING] 'project' uses 'org.apache.maven.its.mng5572:plugin' as extension which is not possible within the same reactor build. This plugin was pulled from the local repository!" ); + if ( getMavenVersion().getMajorVersion() <= 3 ) + { + verifier.verifyTextInLog( "[WARNING] project uses org.apache.maven.its.mng5572:plugin as extensions, which is not possible within the same reactor build. This plugin was pulled from the local repository!" ); + } + else + { + verifier.verifyTextInLog( "[WARNING] 'project' uses 'org.apache.maven.its.mng5572:plugin' as extension which is not possible within the same reactor build. This plugin was pulled from the local repository!" ); + } verifier.resetStreams(); } diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java index fde2deb..5f8dff1 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5937MavenWrapper.java @@ -54,17 +54,23 @@ public class MavenITmng5937MavenWrapper { super( "[4.0.0-alpha-1,)" ); - String localRepo = System.getProperty("maven.repo.local"); - envVars = new HashMap<>( 4 ); - envVars.put( "MVNW_REPOURL", Paths.get( localRepo ).toUri().toURL().toString() ); - envVars.put( "MVNW_VERBOSE", "true" ); - String javaHome = System.getenv( "JAVA_HOME" ); - if ( javaHome != null ) + + if ( !isSkipped() ) { - // source needs to call the javac executable. - // if JAVA_HOME is not set, ForkedLauncher sets it to java.home, which is the JRE home - envVars.put( "JAVA_HOME", javaHome ); + String localRepo = System.getProperty( "maven.repo.local" ); + if ( localRepo != null ) + { + envVars.put( "MVNW_REPOURL", Paths.get( localRepo ).toUri().toURL().toString() ); + envVars.put( "MVNW_VERBOSE", "true" ); + } + String javaHome = System.getenv( "JAVA_HOME" ); + if ( javaHome != null ) + { + // source needs to call the javac executable. + // if JAVA_HOME is not set, ForkedLauncher sets it to java.home, which is the JRE home + envVars.put( "JAVA_HOME", javaHome ); + } } } diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6759TransitiveDependencyRepositoriesTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6759TransitiveDependencyRepositoriesTest.java index 21eae3c..e51a19a 100644 --- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6759TransitiveDependencyRepositoriesTest.java +++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng6759TransitiveDependencyRepositoriesTest.java @@ -55,7 +55,14 @@ public class MavenITmng6759TransitiveDependencyRepositoriesTest extends Abstract Verifier verifier = newVerifier( dependencyCProjectDir.getAbsolutePath() ); verifier.deleteDirectory( "target" ); - verifier.addCliOption( "-DaltDeploymentRepository=customRepo::" + customRepoUri ); + if ( getMavenVersion().getMajorVersion() <= 3 ) + { + verifier.addCliOption( "-DaltDeploymentRepository=customRepo::" + customRepoUri ); + } + else + { + verifier.addCliOption( "-DaltDeploymentRepository=customRepo::default::" + customRepoUri ); + } verifier.executeGoal( "deploy" ); verifier.verifyErrorFreeLog(); return customRepoUri;
