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 2008/12/22 13:23:53 UTC

svn commit: r728660 - in /maven/components/trunk/maven-project/src/test: java/org/apache/maven/project/builder/ resources-project-builder/equal-plugin-deps/ resources-project-builder/single-test-poms/

Author: bentmann
Date: Mon Dec 22 04:23:52 2008
New Revision: 728660

URL: http://svn.apache.org/viewvc?rev=728660&view=rev
Log:
o Synced UT with MNG-3838

Added:
    maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/   (with props)
    maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml   (with props)
Removed:
    maven/components/trunk/maven-project/src/test/resources-project-builder/single-test-poms/
Modified:
    maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java

Modified: maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java?rev=728660&r1=728659&r2=728660&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java (original)
+++ maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java Mon Dec 22 04:23:52 2008
@@ -73,17 +73,16 @@
         PomTestWrapper tester = new PomTestWrapper( model );
         assertModelEquals( tester, "child-descriptor", "build/plugins[1]/executions[1]/goals[1]" );
     }
-    
-    public void testTwoPluginsWithDependencies()
-    	throws Exception
-	{        
-	    File pomFile = new File( testDirectory, "single-test-poms/pluginDependencies.xml" );        
-	    PomArtifactResolver resolver = artifactResolver( "single-test-poms" );                
-	    PomClassicDomainModel model = projectBuilder.buildModel( pomFile, null, resolver );                
-	    PomTestWrapper pom = new PomTestWrapper( model );               
-	    List<?> dependencies = (List<?>) pom.getValue( "build/plugins[1]/dependencies" );                
-	    assertEquals( 1, dependencies.size() );
-	}    
+
+    public void testErroneousJoiningOfDifferentPluginsWithEqualDependencies()
+        throws Exception
+    {
+        PomTestWrapper pom = buildPom( "equal-plugin-deps" );
+        assertEquals( "maven-it-plugin-a", pom.getValue( "build/plugins[1]/artifactId" ) );
+        assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
+        assertEquals( "maven-it-plugin-b", pom.getValue( "build/plugins[2]/artifactId" ) );
+        assertEquals( 1, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
+    }
 
     /* FIXME: cf. MNG-3821
     public void testErroneousJoiningOfDifferentPluginsWithEqualExecutionIds()

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml?rev=728660&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml (added)
+++ maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml Mon Dec 22 04:23:52 2008
@@ -0,0 +1,64 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng3838</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+  <name>Maven Integration Test :: MNG-3838</name> 
+  <description>
+    Verify that using the same dependency for different plugins doesn't blow up the project builder.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-a</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <dependencies>
+          <!-- NOTE: That's exactly the same dependency as for the other plugin. -->
+          <dependency>
+            <groupId>org.apache.maven.its.mng3838</groupId>
+            <artifactId>dep</artifactId>
+            <version>123</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-b</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <dependencies>
+          <!-- NOTE: That's exactly the same dependency as for the other plugin. -->
+          <dependency>
+            <groupId>org.apache.maven.its.mng3838</groupId>
+            <artifactId>dep</artifactId>
+            <version>123</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-project/src/test/resources-project-builder/equal-plugin-deps/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision