MNG-5503: IT for the issue where Maven 3.1.0 fails to resolve artifacts produced by reactor build

This commit is contained in:
Jason van Zyl 2013-08-20 05:59:47 -07:00
parent 2d444abda7
commit 8d94508851
6 changed files with 129 additions and 0 deletions

1
its/.gitignore vendored
View File

@ -1,5 +1,6 @@
.svn .svn
target target
repo
.project .project
.classpath .classpath
.settings .settings

View File

@ -0,0 +1,57 @@
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.util.ResourceExtractor;
import java.io.File;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-5503">MNG-5418</a>.
*
* @author jvz
*/
public class MavenITmng5503ZipInReactorTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng5503ZipInReactorTest()
{
super( "[3.1,)" );
}
/**
* Test that zip attached in the assembly plugin is found in the reactor. Simply running verify is sufficient to know that
* it is found with this project setup.
*/
public void testit()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5503" );
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
verifier.executeGoal( "verify" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -0,0 +1,30 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>module-a</artifactId>
<version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptors>
<descriptor>zip.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,16 @@
<assembly>
<id>zip</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>pom.xml</include>
</includes>
</fileSet>
</fileSets>
</assembly>

View File

@ -0,0 +1,14 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>module-b</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>module-a</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>zip</type>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,11 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven</groupId>
<artifactId>mng-5503-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>module-a</module>
<module>module-b</module>
</modules>
</project>