mirror of https://github.com/apache/maven.git
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:
parent
d0b192dbfe
commit
5fa5f45a67
|
@ -60,6 +60,10 @@ public class MavenITmng3057VersionExprTransformationsTest
|
||||||
File remoteRepo = new File( testDir, "target/deployment" );
|
File remoteRepo = new File( testDir, "target/deployment" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
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" );
|
verifier.deleteArtifacts( "org.apache.maven.its.mng3057" );
|
||||||
|
|
||||||
Properties properties = verifier.newDefaultFilterProperties();
|
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" );
|
// envars.put( "MAVEN_OPTS", "-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=5005 -Djava.compiler=NONE" );
|
||||||
// verifier.executeGoal( "deploy", envars );
|
// verifier.executeGoal( "deploy", envars );
|
||||||
|
|
||||||
verifier.executeGoal( "deploy" );
|
verifier.executeGoal( "generate-sources" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
|
@ -107,4 +111,5 @@ public class MavenITmng3057VersionExprTransformationsTest
|
||||||
assertNull( parent );
|
assertNull( parent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,21 +1,36 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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"
|
<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">
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>level2</artifactId>
|
|
||||||
<groupId>org.apache.maven.its.mng3057</groupId>
|
<groupId>org.apache.maven.its.mng3057</groupId>
|
||||||
|
<artifactId>level2</artifactId>
|
||||||
<version>${testVersion}</version>
|
<version>${testVersion}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>level3</artifactId>
|
<artifactId>level3</artifactId>
|
||||||
<version>${testVersion}</version>
|
<version>${testVersion}</version>
|
||||||
|
|
||||||
<dependencies>
|
<build>
|
||||||
<dependency>
|
<plugins>
|
||||||
<groupId>junit</groupId>
|
<plugin>
|
||||||
<artifactId>junit</artifactId>
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
<version>3.8.1</version>
|
<artifactId>maven-it-plugin-artifact</artifactId>
|
||||||
<scope>test</scope>
|
<version>2.1-SNAPSHOT</version>
|
||||||
</dependency>
|
<executions>
|
||||||
</dependencies>
|
<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>
|
</project>
|
||||||
|
|
|
@ -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!" );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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 );
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,15 +1,18 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>mng-3057</artifactId>
|
<groupId>org.apache.maven.its.mng3057</groupId>
|
||||||
<groupId>org.apache.maven.its.mng3057</groupId>
|
<artifactId>mng-3057</artifactId>
|
||||||
<version>${testVersion}</version>
|
<version>${testVersion}</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>level2</artifactId>
|
<artifactId>level2</artifactId>
|
||||||
<version>${testVersion}</version>
|
<version>${testVersion}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>level3</module>
|
<module>level3</module>
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.apache.maven.its.mng3057</groupId>
|
<groupId>org.apache.maven.its.mng3057</groupId>
|
||||||
<artifactId>mng-3057</artifactId>
|
<artifactId>mng-3057</artifactId>
|
||||||
<version>${testVersion}</version>
|
<version>${testVersion}</version>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>Integration Test Project for MNG-3057</name>
|
<name>Integration Test Project for MNG-3057</name>
|
||||||
<description>
|
<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>
|
</description>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
@ -24,26 +24,46 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>level2</module>
|
<module>level2</module>
|
||||||
</modules>
|
</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>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
<version>2.0.2</version>
|
<artifactId>maven-it-plugin-artifact</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<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>
|
<id>mcompiler-94</id>
|
||||||
|
<phase>validate</phase>
|
||||||
<goals>
|
<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>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in New Issue