mirror of https://github.com/apache/maven.git
o Synced UT with MNG-3838
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@728660 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3ce9917532
commit
cb1d2917fa
|
@ -74,16 +74,15 @@ public class PomConstructionTest
|
|||
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()
|
||||
|
|
|
@ -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>
|
|
@ -1,33 +0,0 @@
|
|||
<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.sonatype.nexus</groupId>
|
||||
<artifactId>nexus-configuration</artifactId>
|
||||
<version>1.0</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.modello</groupId>
|
||||
<artifactId>modello-maven-plugin</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>modello-plugin-upgrade</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue