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 2009/02/10 23:37:21 UTC

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

Author: bentmann
Date: Tue Feb 10 22:37:20 2009
New Revision: 743142

URL: http://svn.apache.org/viewvc?rev=743142&view=rev
Log:
[MNG-2174] <pluginManagement><plugins><plugin><dependencies> do not propogate to child POM plugins

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2174PluginDepsManagedByParentProfileTest.java   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/pom.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/pom.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.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=743142&r1=743141&r2=743142&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 Tue Feb 10 22:37:20 2009
@@ -243,6 +243,7 @@
         suite.addTestSuite( MavenITmng2228ComponentInjectionTest.class );
         suite.addTestSuite( MavenITmng2201PluginConfigInterpolationTest.class );
         suite.addTestSuite( MavenITmng2196ParentResolutionTest.class );
+        suite.addTestSuite( MavenITmng2174PluginDepsManagedByParentProfileTest.class );
         suite.addTestSuite( MavenITmng2136ActiveByDefaultProfileTest.class );
         suite.addTestSuite( MavenITmng2130ParentLookupFromReactorCacheTest.class );
         suite.addTestSuite( MavenITmng2124PomInterpolationWithParentValuesTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2174PluginDepsManagedByParentProfileTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2174PluginDepsManagedByParentProfileTest.java?rev=743142&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2174PluginDepsManagedByParentProfileTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2174PluginDepsManagedByParentProfileTest.java Tue Feb 10 22:37:20 2009
@@ -0,0 +1,65 @@
+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-2174">MNG-2174</a>.
+ * 
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class MavenITmng2174PluginDepsManagedByParentProfileTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng2174PluginDepsManagedByParentProfileTest()
+    {
+        super( "[2.0.9,3.0-alpha-1),[3.0-alpha-3,)" );
+    }
+
+    /**
+     * Verify that plugin dependencies defined by plugin management of a parent profile are not lost when the
+     * parent's main plugin management section is also present.
+     */
+    public void testitMNG2174()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2174" );
+
+        Verifier verifier = new Verifier( new File( testDir, "sub" ).getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng2174" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        Properties props = verifier.loadProperties( "target/pcl.properties" );
+        assertEquals( "1", props.getProperty( "mng-2174.properties.count" ) );
+        assertNotNull( props.getProperty( "mng-2174.properties" ) );
+    }
+
+}

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/pom.xml?rev=743142&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/pom.xml Tue Feb 10 22:37:20 2009
@@ -0,0 +1,77 @@
+<?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.mng2174</groupId>
+  <artifactId>parent</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2174</name> 
+  <description>
+    Verify that plugin dependencies defined by plugin management of a parent profile are not lost when the
+    parent's main plugin management section is also present.
+  </description>
+
+  <modules>
+    <module>sub</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-class-loader</artifactId>
+          <version>2.1-SNAPSHOT</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>maven-core-it</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.apache.maven.its.plugins</groupId>
+              <artifactId>maven-it-plugin-class-loader</artifactId>
+              <dependencies>
+                <dependency>
+                  <groupId>org.apache.maven.its.mng2174</groupId>
+                  <artifactId>a</artifactId>
+                  <version>0.1</version>
+                </dependency>
+              </dependencies>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+  </profiles>
+</project>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/pom.xml?rev=743142&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/pom.xml Tue Feb 10 22:37:20 2009
@@ -0,0 +1,87 @@
+<?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>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng2174</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <groupId>org.apache.maven.its.mng2174</groupId>
+  <artifactId>child</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Maven Integration Test :: MNG-2174</name> 
+  <description>
+    Verify that plugin dependencies defined by plugin management of a parent profile are not lost when the
+    parent's main plugin management section is also present.
+  </description>
+
+  <repositories>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+      <releases>
+        <checksumPolicy>ignore</checksumPolicy>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+      <releases>
+        <checksumPolicy>ignore</checksumPolicy>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-class-loader</artifactId>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <configuration>
+              <resourcePaths>mng-2174.properties</resourcePaths>
+              <pluginClassLoaderOutput>target/pcl.properties</pluginClassLoaderOutput>
+            </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-2174/sub/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.jar?rev=743142&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.pom?rev=743142&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/0.1/a-0.1.pom Tue Feb 10 22:37:20 2009
@@ -0,0 +1,36 @@
+<?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.mng2174</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <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-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml?rev=743142&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml Tue Feb 10 22:37:20 2009
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+  <groupId>org.apache.maven.its.mng2174</groupId>
+  <artifactId>a</artifactId>
+  <version>0.1</version>
+  <versioning>
+    <release>0.1</release>
+    <versions>
+      <version>0.1</version>
+    </versions>
+    <lastUpdated>20090210221257</lastUpdated>
+  </versioning>
+</metadata>
\ No newline at end of file

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2174/sub/repo/org/apache/maven/its/mng2174/a/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision