[MNG-2668] add an integration test for sorting in the reactor based on plugin dependencies

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@738714 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2009-01-29 02:25:21 +00:00
parent 3d373e32f5
commit 298296a24f
4 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,45 @@
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;
public class MavenITmng2668UsePluginDependenciesForSortingTest
extends AbstractMavenIntegrationTestCase
{
public void testmng2668()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2668" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteArtifacts( "org.apache.maven.its.mng2668" );
verifier.executeGoal( "install" );
verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "project", "1.0-SNAPSHOT", "jar" );
verifier.assertArtifactPresent( "org.apache.maven.its.mng2668", "tools", "1.0-SNAPSHOT", "jar" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng2668</groupId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<artifactId>test-project</artifactId>
<name>test-project</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<modules>
<!-- note project goes first -->
<module>project</module>
<module>tools</module>
</modules>
</project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2668</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>test-project</artifactId>
</parent>
<artifactId>project</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
<version>2.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>tools</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,10 @@
<?xml version="1.0"?><project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.maven.its.mng2668</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>test-project</artifactId>
</parent>
<artifactId>tools</artifactId>
</project>