o Decoupled IT from production plugins

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@775704 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-17 16:40:29 +00:00
parent d0b192dbfe
commit 5fa5f45a67
7 changed files with 72 additions and 80 deletions

View File

@ -60,6 +60,10 @@ public class MavenITmng3057VersionExprTransformationsTest
File remoteRepo = new File( testDir, "target/deployment" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
verifier.deleteDirectory( "level2/target" );
verifier.deleteDirectory( "level2/level3/target" );
verifier.deleteArtifacts( "org.apache.maven.its.mng3057" );
Properties properties = verifier.newDefaultFilterProperties();
@ -78,7 +82,7 @@ public class MavenITmng3057VersionExprTransformationsTest
// envars.put( "MAVEN_OPTS", "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=5005 -Djava.compiler=NONE" );
// verifier.executeGoal( "deploy", envars );
verifier.executeGoal( "deploy" );
verifier.executeGoal( "generate-sources" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
@ -107,4 +111,5 @@ public class MavenITmng3057VersionExprTransformationsTest
assertNull( parent );
}
}
}

View File

@ -1,21 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>level2</artifactId>
<groupId>org.apache.maven.its.mng3057</groupId>
<artifactId>level2</artifactId>
<version>${testVersion}</version>
</parent>
<artifactId>level3</artifactId>
<version>${testVersion}</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>package</id>
<phase>initialize</phase>
<goals>
<goal>set</goal>
<goal>attach-pom</goal>
</goals>
<configuration>
<mainFile>artifact.jar</mainFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,13 +0,0 @@
package org.apache.maven.its.mng3057;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -1,38 +0,0 @@
package org.apache.maven.its.mng3057;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}

View File

@ -1,14 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<artifactId>mng-3057</artifactId>
<groupId>org.apache.maven.its.mng3057</groupId>
<version>${testVersion}</version>
</parent>
<groupId>org.apache.maven.its.mng3057</groupId>
<artifactId>mng-3057</artifactId>
<version>${testVersion}</version>
</parent>
<artifactId>level2</artifactId>
<version>${testVersion}</version>
<packaging>pom</packaging>
<modules>
<module>level3</module>
</modules>

View File

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.mng3057</groupId>
<artifactId>mng-3057</artifactId>
<version>${testVersion}</version>
<packaging>pom</packaging>
<name>Integration Test Project for MNG-3057</name>
<description>
This project verifies that MNG-3057 is fixed. It is controlled by a JUnit test called org.apache.maven.integrationtests.MNG3057Test
This project verifies that MNG-3057 is fixed.
</description>
<distributionManagement>
@ -25,21 +25,41 @@
<module>level2</module>
</modules>
<!-- This section is technically INCORRECT, but should have no effect on the result
of the build. It is described in MCOMPILER-94, and could interact with the
handling of POMs for install and deploy, when packaging == pom. Adding here
to force the issue and make sure the POM transformation still happens correctly.
-->
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-artifact</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<!--
This execution is technically INCORRECT, but should have no effect on the result
of the build. It is described in MCOMPILER-94, and could interact with the
handling of POMs for install and deploy, when packaging == pom. Adding here
to force the issue and make sure the POM transformation still happens correctly.
-->
<id>mcompiler-94</id>
<phase>validate</phase>
<goals>
<goal>compile</goal>
<goal>set</goal>
</goals>
<configuration>
<mainFile>target/classes</mainFile>
</configuration>
</execution>
<execution>
<id>install</id>
<phase>generate-sources</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
<execution>
<id>deploy</id>
<phase>generate-sources</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>