You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/09/14 21:10:12 UTC
[GitHub] [maven-integration-testing] michael-o commented on a diff in pull request #199: Remove code corresponding to Maven 2.x and JDK 7
michael-o commented on code in PR #199:
URL: https://github.com/apache/maven-integration-testing/pull/199#discussion_r971298887
##########
core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java:
##########
@@ -568,33 +568,19 @@ protected Verifier newVerifier( String basedir, String settings, boolean debug )
String path = settingsFile.getAbsolutePath();
- // dedicated CLI option only available since MNG-3914
- if ( matchesVersionRange( "[2.1.0,)" ) )
+ verifier.addCliOption( "--global-settings" );
+ if ( path.indexOf( ' ' ) < 0 )
{
- verifier.addCliOption( "--global-settings" );
- if ( path.indexOf( ' ' ) < 0 )
- {
- verifier.addCliOption( path );
- }
- else
- {
- verifier.addCliOption( '"' + path + '"' );
- }
+ verifier.addCliOption( path );
}
else
{
- verifier.getSystemProperties().put( "org.apache.maven.global-settings", path );
+ verifier.addCliOption( '"' + path + '"' );
}
Review Comment:
Do we still need to quote ourselves? Feels weird, no?
##########
core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0294MergeGlobalAndUserSettingsTest.java:
##########
@@ -53,16 +53,9 @@ public void testitMNG294()
verifier.deleteDirectory( "target" );
verifier.addCliOption( "--settings" );
verifier.addCliOption( "user-settings.xml" );
- if ( matchesVersionRange( "[2.1.0-M2,)" ) )
- {
- // dedicated CLI option only available since MNG-3914
- verifier.addCliOption( "--global-settings" );
- verifier.addCliOption( "global-settings.xml" );
- }
- else
- {
- verifier.setSystemProperty( "org.apache.maven.global-settings", "global-settings.xml" );
- }
+ verifier.addCliOption( "--global-settings" );
+ verifier.addCliOption( "global-settings.xml" );
+
if ( matchesVersionRange( "(3.2.5,)" ) )
{
verifier.getSystemProperties().put( "maven.multiModuleProjectDirectory", testDir.getAbsolutePath() );
Review Comment:
Can't this be simplified as well since we have now 3.9.0+?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org