diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index d227e33e68..f93b1a93d1 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -88,6 +88,7 @@ public class IntegrationTestSuite suite.addTestSuite( MavenITmng4572ModelVersionSurroundedByWhitespaceTest.class ); suite.addTestSuite( MavenITmng4561MirroringOfPluginRepoTest.class ); suite.addTestSuite( MavenITmng4554PluginPrefixMappingUpdateTest.class ); + suite.addTestSuite( MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.class ); suite.addTestSuite( MavenITmng4544ActiveComponentCollectionThreadSafeTest.class ); suite.addTestSuite( MavenITmng4536RequiresNoProjectForkingMojoTest.class ); suite.addTestSuite( MavenITmng4528ExcludeWagonsFromMavenCoreArtifactsTest.class ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java new file mode 100644 index 0000000000..48554323d0 --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java @@ -0,0 +1,66 @@ +package org.apache.maven.it; + +/* + * 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. + */ + +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + +import java.io.File; +import java.util.Properties; + +/** + * This is a test set for MNG-4553. + * + * @author Benjamin Bentmann + */ +public class MavenITmng4553CoreArtifactFilterConsidersGroupIdTest + extends AbstractMavenIntegrationTestCase +{ + + public MavenITmng4553CoreArtifactFilterConsidersGroupIdTest() + { + super( "[3.0-alpha-7,)" ); + } + + /** + * Verify that the core artifact filter considers both artifact id and group id. + */ + public void testit() + throws Exception + { + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4553" ); + + Verifier verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.setAutoclean( false ); + verifier.deleteDirectory( "target" ); + verifier.deleteArtifacts( "org.apache.maven.its.mng4553" ); + verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() ); + verifier.getCliOptions().add( "-s" ); + verifier.getCliOptions().add( "settings.xml" ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + Properties pclProps = verifier.loadProperties( "target/pcl.properties" ); + assertNotNull( pclProps.getProperty( "mng4553.properties" ) ); + assertEquals( "1", pclProps.getProperty( "mng4553.properties.count" ) ); + } + +} diff --git a/its/core-it-suite/src/test/resources/mng-4553/pom.xml b/its/core-it-suite/src/test/resources/mng-4553/pom.xml new file mode 100644 index 0000000000..09f582f723 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4553/pom.xml @@ -0,0 +1,65 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4553 + test + 1.0 + + Maven Integration Test :: MNG-4553 + + Verify that the core artifact filter considers both artifact id and group id. + + + + + + org.apache.maven.its.plugins + maven-it-plugin-class-loader + 2.1-SNAPSHOT + + + + org.apache.maven.its.mng4553 + maven-plugin-api + 2.0 + + + + + load + validate + + mng4553.properties + target/pcl.properties + target/tccl.properties + + + load + + + + + + + diff --git a/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.jar b/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.jar new file mode 100644 index 0000000000..262b36a742 Binary files /dev/null and b/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.jar differ diff --git a/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.pom b/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.pom new file mode 100644 index 0000000000..26d9d68426 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/maven-plugin-api-2.0.pom @@ -0,0 +1,41 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng4553 + maven-plugin-api + 2.0 + jar + + Maven Integration Test :: MNG-4553 + + Verify that the core artifact filter considers both artifact id and group id. + + + + + maven-core-it + file:///${basedir}/repo + + + diff --git a/its/core-it-suite/src/test/resources/mng-4553/settings-template.xml b/its/core-it-suite/src/test/resources/mng-4553/settings-template.xml new file mode 100644 index 0000000000..cde4215860 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-4553/settings-template.xml @@ -0,0 +1,55 @@ + + + + + + + + maven-core-it-repo + + + maven-core-it + @baseurl@/repo + + ignore + + + false + + + + + + maven-core-it + @baseurl@/repo + + ignore + + + false + + + + + + + maven-core-it-repo + +