mirror of https://github.com/apache/maven.git
[MNG-4003] Failed Unit Test on Building Plexus Velocity Component
o Added UT git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@737894 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d93227ad4a
commit
eb08946492
|
@ -628,6 +628,28 @@ public class PomConstructionTest
|
|||
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||
}
|
||||
|
||||
public void testDependencyOrderWithoutPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "dependency-order/wo-plugin-mngt" );
|
||||
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
||||
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
||||
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
||||
assertEquals( "b", pom.getValue( "dependencies[3]/artifactId" ) );
|
||||
assertEquals( "d", pom.getValue( "dependencies[4]/artifactId" ) );
|
||||
}
|
||||
|
||||
public void testDependencyOrderWithPluginManagement()
|
||||
throws Exception
|
||||
{
|
||||
PomTestWrapper pom = buildPom( "dependency-order/w-plugin-mngt" );
|
||||
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
||||
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
||||
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
||||
assertEquals( "b", pom.getValue( "dependencies[3]/artifactId" ) );
|
||||
assertEquals( "d", pom.getValue( "dependencies[4]/artifactId" ) );
|
||||
}
|
||||
|
||||
private PomArtifactResolver artifactResolver( String basedir )
|
||||
{
|
||||
return new FileBasedPomArtifactResolver( new File( BASE_POM_DIR, basedir ) );
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<?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.mng4003</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>Maven Integration Test :: MNG-4003</name>
|
||||
<description>
|
||||
Verify that dependencies survive the project construction in the POM order.
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>a</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>c</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>b</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>d</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- NOTE: The combination with a plugin management section is an essential part of the test -->
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,66 @@
|
|||
<?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.mng4003</groupId>
|
||||
<artifactId>test</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<name>Maven Integration Test :: MNG-4003</name>
|
||||
<description>
|
||||
Verify that dependencies survive the project construction in the POM order.
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>a</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>c</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>b</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its.mng4003</groupId>
|
||||
<artifactId>d</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- NOTE: The combination with a plugin section is an essential part of the test -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue