mirror of
https://github.com/apache/maven.git
synced 2025-02-08 11:05:37 +00:00
o Decoupled ITs from production plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@736024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b68956f74a
commit
49d23968f2
@ -41,14 +41,16 @@ public void testitMNG282()
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0282" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0282" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
verifier.deleteArtifact( "org.apache.maven.its.plugins", "maven-it-plugin-no-project", "1.0", "maven-plugin" );
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
|
verifier.deleteDirectory( "subproject/target" );
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-no-project:light-touch" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-no-project:light-touch" );
|
||||||
verifier.assertFilePresent( "target/touch.txt" );
|
verifier.assertFilePresent( "target/touch.txt" );
|
||||||
verifier.assertFileNotPresent( "subproject/target/touch.txt" );
|
verifier.assertFileNotPresent( "subproject/target/touch.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
public class MavenITmng0294MergeGlobalAndUserSettingsTest
|
public class MavenITmng0294MergeGlobalAndUserSettingsTest
|
||||||
extends AbstractMavenIntegrationTestCase
|
extends AbstractMavenIntegrationTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public MavenITmng0294MergeGlobalAndUserSettingsTest()
|
public MavenITmng0294MergeGlobalAndUserSettingsTest()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -45,7 +46,10 @@ public void testitMNG294()
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0294" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0294" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
Properties systemProperties = new Properties();
|
Properties systemProperties = new Properties();
|
||||||
systemProperties.put( "org.apache.maven.user-settings", "user-settings.xml" );
|
systemProperties.put( "org.apache.maven.user-settings", "user-settings.xml" );
|
||||||
systemProperties.put( "org.apache.maven.global-settings", "global-settings.xml" );
|
systemProperties.put( "org.apache.maven.global-settings", "global-settings.xml" );
|
||||||
@ -58,9 +62,10 @@ public void testitMNG294()
|
|||||||
verifier.getCliOptions().add( new File( testDir, "global-settings.xml" ).getAbsolutePath() );
|
verifier.getCliOptions().add( new File( testDir, "global-settings.xml" ).getAbsolutePath() );
|
||||||
}
|
}
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
|
||||||
verifier.assertFilePresent( "target/test.txt" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
|
verifier.assertFilePresent( "target/test.txt" );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,15 +43,18 @@ public void testitMNG471()
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0471" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0471" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
List goals = Arrays.asList( new String[]{"org.apache.maven.its.plugins:maven-it-plugin-fork:fork",
|
List goals = Arrays.asList( new String[]{"org.apache.maven.its.plugins:maven-it-plugin-fork:fork",
|
||||||
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork-goal"} );
|
"org.apache.maven.its.plugins:maven-it-plugin-fork:fork-goal"} );
|
||||||
verifier.executeGoals( goals );
|
verifier.executeGoals( goals );
|
||||||
verifier.assertFilePresent( "target/forked/touch.txt" );
|
|
||||||
verifier.assertFilePresent( "target/forked2/touch.txt" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
|
verifier.assertFilePresent( "target/forked/touch.txt" );
|
||||||
|
verifier.assertFilePresent( "target/forked2/touch.txt" );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -47,6 +47,8 @@ public void testitMNG479()
|
|||||||
// Phase 1: Ensure the test plugin is downloaded before the test cuts off access to central
|
// Phase 1: Ensure the test plugin is downloaded before the test cuts off access to central
|
||||||
File child1 = new File( testDir, "setup" );
|
File child1 = new File( testDir, "setup" );
|
||||||
Verifier verifier = new Verifier( child1.getAbsolutePath() );
|
Verifier verifier = new Verifier( child1.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
|
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
@ -55,6 +57,8 @@ public void testitMNG479()
|
|||||||
// Phase 2: Now run the test
|
// Phase 2: Now run the test
|
||||||
File child2 = new File( testDir, "test" );
|
File child2 = new File( testDir, "test" );
|
||||||
verifier = new Verifier( child2.getAbsolutePath() );
|
verifier = new Verifier( child2.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
|
|
||||||
verifier.setCliOptions( Collections.singletonList( "-s settings.xml" ) );
|
verifier.setCliOptions( Collections.singletonList( "-s settings.xml" ) );
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-expression:2.1-SNAPSHOT:eval" );
|
||||||
|
@ -44,6 +44,8 @@ public void testitMNG496()
|
|||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0496" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0496" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-file:2.1-SNAPSHOT:file" );
|
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-file:2.1-SNAPSHOT:file" );
|
||||||
verifier.assertFilePresent( "target/file.txt" );
|
verifier.assertFilePresent( "target/file.txt" );
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
import org.apache.maven.it.util.ResourceExtractor;
|
import org.apache.maven.it.util.ResourceExtractor;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-507">MNG-507</a>.
|
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-507">MNG-507</a>.
|
||||||
@ -41,17 +42,25 @@ public void testitMNG507()
|
|||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0507" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-0507" );
|
||||||
|
|
||||||
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
|
||||||
|
verifier.setAutoclean( false );
|
||||||
|
verifier.deleteDirectory( "target" );
|
||||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
||||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
||||||
|
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "jar" );
|
||||||
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
verifier.deleteArtifact( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
||||||
verifier.executeGoal( "package" );
|
verifier.executeGoal( "validate" );
|
||||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
|
||||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
|
||||||
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
verifier.resetStreams();
|
verifier.resetStreams();
|
||||||
|
|
||||||
}
|
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "jar" );
|
||||||
}
|
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support", "1.1", "pom" );
|
||||||
|
verifier.assertArtifactPresent( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "pom" );
|
||||||
|
verifier.assertArtifactNotPresent( "org.apache.maven", "maven-core-it-support-old-location", "1.1", "jar" );
|
||||||
|
|
||||||
|
List artifacts = verifier.loadLines( "target/artifacts.txt", "UTF-8" );
|
||||||
|
assertTrue( artifacts.toString(), artifacts.contains( "org.apache.maven:maven-core-it-support:jar:1.1" ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package org.apache.maven.it0023;
|
|
||||||
|
|
||||||
public class Person
|
|
||||||
{
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
public void setName( String name )
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +1,62 @@
|
|||||||
|
<?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>
|
<project>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<name>Maven Integration Test :: it0035</name>
|
|
||||||
<groupId>org.apache.maven.its.it0035</groupId>
|
<groupId>org.apache.maven.its.mng0507</groupId>
|
||||||
<artifactId>maven-it-it0035</artifactId>
|
<artifactId>test</artifactId>
|
||||||
<description>Test artifact relocation.</description>
|
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
|
<name>Maven Integration Test :: MNG-507</name>
|
||||||
|
<description>Test artifact relocation.</description>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>junit</groupId>
|
|
||||||
<artifactId>junit</artifactId>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
<type>jar</type>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
<artifactId>maven-core-it-support-old-location</artifactId>
|
<artifactId>maven-core-it-support-old-location</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.its.plugins</groupId>
|
||||||
|
<artifactId>maven-it-plugin-dependency-resolution</artifactId>
|
||||||
|
<version>2.1-SNAPSHOT</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>test</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<configuration>
|
||||||
|
<compileArtifacts>target/artifacts.txt</compileArtifacts>
|
||||||
|
<significantPathLevels>1</significantPathLevels>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>compile</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user