[MNG-3401][MNG-3203] Adding ITs

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@783175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2009-06-10 01:38:20 +00:00
parent 76a1edfe52
commit a4f20525d6
6 changed files with 206 additions and 0 deletions

View File

@ -220,6 +220,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng3428PluginDescriptorArtifactsIncompleteTest.class );
suite.addTestSuite( MavenITmng3422ActiveComponentCollectionTest.class );
suite.addTestSuite( MavenITmng3415JunkRepositoryMetadataTest.class );
suite.addTestSuite( MavenITmng3401CLIDefaultExecIdTest.class );
suite.addTestSuite( MavenITmng3396DependencyManagementForOverConstrainedRangesTest.class );
suite.addTestSuite( MavenITmng3394POMPluginVersionDominanceTest.class );
suite.addTestSuite( MavenITmng3380ManagedRelocatedTransdepsTest.class );
@ -236,6 +237,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng3259DepsDroppedInMultiModuleBuildTest.class );
suite.addTestSuite( MavenITmng3220ImportScopeTest.class );
suite.addTestSuite( MavenITmng3217InterPluginDependencyTest.class );
suite.addTestSuite( MavenITmng3203DefaultLifecycleExecIdTest.class );
suite.addTestSuite( MavenITmng3139UseCachedMetadataOfBlacklistedRepoTest.class );
suite.addTestSuite( MavenITmng3118TestClassPathOrderTest.class );
suite.addTestSuite( MavenITmng3106ProfileMultipleActivatorsTest.class );

View File

@ -0,0 +1,62 @@
/*
* 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.
*/
package org.apache.maven.it;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.it.AbstractMavenIntegrationTestCase;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3203">MNG-3203</a>.
*
* @todo Fill in a better description of what this test verifies!
*
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @author jdcasey
*
*/
public class MavenITmng3203DefaultLifecycleExecIdTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng3203DefaultLifecycleExecIdTest()
throws InvalidVersionSpecificationException
{
super( "(2.1.99,)" );
}
public void testitMNG3203 ()
throws Exception
{
// The testdir is computed from the location of this
// file.
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3203" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.executeGoal( "compile" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -0,0 +1,73 @@
/*
* 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.
*/
package org.apache.maven.it;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
import org.apache.maven.it.AbstractMavenIntegrationTestCase;
import org.apache.maven.it.Verifier;
import org.apache.maven.it.VerificationException;
import org.apache.maven.it.util.ResourceExtractor;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-3401">MNG-3401</a>.
*
* @todo Fill in a better description of what this test verifies!
*
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
* @author jdcasey
*
*/
public class MavenITmng3401CLIDefaultExecIdTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng3401CLIDefaultExecIdTest()
throws InvalidVersionSpecificationException
{
super( "(2.1.99,)" );
}
public void testitMNG3401 ()
throws Exception
{
// The testdir is computed from the location of this
// file.
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3401" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
try
{
verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-touch:touch" );
verifier.verifyErrorFreeLog();
fail( "Failed to incorporate 'default-cli' execution for touch mojo." );
}
catch ( VerificationException e )
{
// expected
}
verifier.resetStreams();
}
}

View File

@ -0,0 +1,27 @@
<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.it.mng3203</groupId>
<artifactId>mng-3203</artifactId>
<packaging>jar</packaging>
<version>1</version>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,16 @@
package org.apache.maven.it.mng3203;
import java.util.List;
import java.util.ArrayList;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
List<String> stuff = new ArrayList<String>();
}
}

View File

@ -0,0 +1,26 @@
<?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.it.mng3401</groupId>
<artifactId>mng-3401</artifactId>
<version>1</version>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-touch</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>