You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2009/08/01 00:20:01 UTC
svn commit: r799760 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-4270/ resources/mng-4270/src/
resources/mng-4270/src/main/ resources/mng-4270/src/main/java/
resources/mng-4270/src/main/java...
Author: jdcasey
Date: Fri Jul 31 22:20:00 2009
New Revision: 799760
URL: http://svn.apache.org/viewvc?rev=799760&view=rev
Log:
[MNG-4270] Integration tests.
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java (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=799760&r1=799759&r2=799760&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 Fri Jul 31 22:20:00 2009
@@ -19,9 +19,6 @@
* under the License.
*/
-import org.apache.maven.it.VerificationException;
-import org.apache.maven.it.Verifier;
-
import java.io.PrintStream;
import junit.framework.Test;
@@ -89,6 +86,7 @@
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng4270ArtifactHandlersFromPluginDepsTest.class );
suite.addTestSuite( MavenITmng4269BadReactorResolutionFromOutDirTest.class );
suite.addTestSuite( MavenITmng4262MakeLikeReactorDottedPathTest.class );
suite.addTestSuite( MavenITmng4254SelectableWagonProvidersTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java?rev=799760&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java Fri Jul 31 22:20:00 2009
@@ -0,0 +1,76 @@
+package org.apache.maven.it;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4270">MNG-4270</a>.
+ *
+ * @author John Casey
+ * @version $Id$
+ */
+public class MavenITmng4270ArtifactHandlersFromPluginDepsTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ private static final String GID = "org.apache.maven.its.mng4270";
+
+ private static final String AID = "mng-4270";
+ private static final String VERSION = "1";
+ private static final String TYPE = "jar";
+
+ private static final String BAD_TYPE = "coreit";
+
+ public MavenITmng4270ArtifactHandlersFromPluginDepsTest()
+ {
+ super( "(2.2.0,)" );
+ }
+
+ public void testProjectPackagingUsage()
+ throws IOException, VerificationException
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/" + AID );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+
+ verifier.deleteArtifacts( GID );
+
+ verifier.executeGoal( "install" );
+
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ // Now, if everything worked, we have .pom and a .jar in the local repo.
+ // IF IT DIDN'T, we have a .pom and a .coreit in the local repo...
+
+ String path = verifier.getArtifactPath( GID, AID, VERSION, TYPE );
+ assertTrue( path + " should have been installed.", new File( path ).exists() );
+
+ path = verifier.getArtifactPath( GID, AID, VERSION, "pom" );
+ assertTrue( path + " should have been installed.", new File( path ).exists() );
+
+ path = verifier.getArtifactPath( GID, AID, VERSION, BAD_TYPE );
+ assertFalse( path + " should NOT have been installed.", new File( path ).exists() );
+ }
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4270ArtifactHandlersFromPluginDepsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml?rev=799760&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml Fri Jul 31 22:20:00 2009
@@ -0,0 +1,59 @@
+<?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 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>
+
+ <groupId>org.apache.maven.its.mng4270</groupId>
+ <artifactId>mng-4270</artifactId>
+ <version>1</version>
+ <packaging>coreit</packaging>
+
+ <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-extension1</artifactId>
+ <version>2.1-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its</groupId>
+ <artifactId>core-it-extension</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <!-- SHOULD load the coreit-1 and coreit lifecycles/artifact-handlers -->
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java?rev=799760&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java Fri Jul 31 22:20:00 2009
@@ -0,0 +1,31 @@
+/*
+ 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.its.mng3506;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+ public static void main( String[] args )
+ {
+ System.out.println( "Hello World!" );
+ }
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/main/java/org/apache/maven/its/mng3506/App.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java?rev=799760&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java Fri Jul 31 22:20:00 2009
@@ -0,0 +1,56 @@
+/*
+ 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.its.mng3506;
+
+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 );
+ }
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4270/src/test/java/org/apache/maven/its/mng3506/AppTest.java
------------------------------------------------------------------------------
svn:eol-style = native