You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/02/27 19:53:43 UTC

svn commit: r917012 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4553/ resources/mng-4553/repo/ resources/mng-4553/repo/org/ resources/mng-4553/repo/org/apache/ resources/mng-4553/repo/org/a...

Author: bentmann
Date: Sat Feb 27 18:53:42 2010
New Revision: 917012

URL: http://svn.apache.org/viewvc?rev=917012&view=rev
Log:
[MNG-4553] Plugins artifact filtering should use full Artifact identification instead only ArtifactId

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/repo/org/apache/maven/its/mng4553/maven-plugin-api/2.0/
    maven/core-integration-testing/trunk/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   (with props)
    maven/core-integration-testing/trunk/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
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml   (with props)
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=917012&r1=917011&r2=917012&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Sat Feb 27 18:53:42 2010
@@ -88,6 +88,7 @@
         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 );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java?rev=917012&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java Sat Feb 27 18:53:42 2010
@@ -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 <a href="http://jira.codehaus.org/browse/MNG-4553">MNG-4553</a>.
+ * 
+ * @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" ) );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4553CoreArtifactFilterConsidersGroupIdTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml?rev=917012&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml Sat Feb 27 18:53:42 2010
@@ -0,0 +1,65 @@
+<?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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng4553</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: MNG-4553</name>
+  <description>
+    Verify that the core artifact filter considers both artifact id and group id.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-class-loader</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <dependencies>
+          <dependency>
+            <!-- This has the same artifact id as org.apache.maven:maven-plugin-api but must not be excluded from the plugin realm -->
+            <groupId>org.apache.maven.its.mng4553</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>2.0</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>load</id>
+            <phase>validate</phase>
+            <configuration>
+              <resourcePaths>mng4553.properties</resourcePaths>
+              <pluginClassLoaderOutput>target/pcl.properties</pluginClassLoaderOutput>
+              <contextClassLoaderOutput>target/tccl.properties</contextClassLoaderOutput>
+            </configuration>
+            <goals>
+              <goal>load</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/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
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/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?rev=917012&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/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
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/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
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/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?rev=917012&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/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 (added)
+++ maven/core-integration-testing/trunk/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 Sat Feb 27 18:53:42 2010
@@ -0,0 +1,41 @@
+<?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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng4553</groupId>
+  <artifactId>maven-plugin-api</artifactId>
+  <version>2.0</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-4553</name>
+  <description>
+    Verify that the core artifact filter considers both artifact id and group id.
+  </description>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml?rev=917012&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml Sat Feb 27 18:53:42 2010
@@ -0,0 +1,55 @@
+<?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>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4553/settings-template.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision