Author: jdcasey Date: Wed Jun 10 01:38:20 2009 New Revision: 783175 URL: http://svn.apache.org/viewvc?rev=783175&view=rev Log: [MNG-3401][MNG-3203] Adding ITs
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java (with props) maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml (with props) Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=783175&r1=783174&r2=783175&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Wed Jun 10 01:38:20 2009 @@ -220,6 +220,7 @@ 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 @@ 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 ); Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java?rev=783175&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java Wed Jun 10 01:38:20 2009 @@ -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:bri...@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(); + } +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3203DefaultLifecycleExecIdTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java?rev=783175&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java Wed Jun 10 01:38:20 2009 @@ -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:bri...@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(); + } +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3401CLIDefaultExecIdTest.java ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml?rev=783175&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml Wed Jun 10 01:38:20 2009 @@ -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> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java?rev=783175&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java Wed Jun 10 01:38:20 2009 @@ -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>(); + } +} Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3203/src/main/java/org/apache/maven/it/mng3203/App.java ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml?rev=783175&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml (added) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml Wed Jun 10 01:38:20 2009 @@ -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> Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3401/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native