maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r896444 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-2135/ resources/mng-2135/plugin/ resources/mng-2135/plugin/src/ resources/mng-2135/plugin/src/main/ resources/mng-2135/plugin...
Date Wed, 06 Jan 2010 13:42:54 GMT
Author: bentmann
Date: Wed Jan  6 13:42:52 2010
New Revision: 896444

URL: http://svn.apache.org/viewvc?rev=896444&view=rev
Log:
[MNG-2135] multi-project build that creates it's own plugins needs bootstrapping

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/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=896444&r1=896443&r2=896444&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 Jan  6 13:42:52 2010
@@ -400,6 +400,7 @@
         suite.addTestSuite( MavenITmng2174PluginDepsManagedByParentProfileTest.class );
         suite.addTestSuite( MavenITmng2140ReactorAwareDepResolutionWhenForkTest.class );
         suite.addTestSuite( MavenITmng2136ActiveByDefaultProfileTest.class );
+        suite.addTestSuite( MavenITmng2135PluginBuildInReactorTest.class );
         suite.addTestSuite( MavenITmng2130ParentLookupFromReactorCacheTest.class );
         suite.addTestSuite( MavenITmng2124PomInterpolationWithParentValuesTest.class );
         suite.addTestSuite( MavenITmng2123VersionRangeDependencyTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java?rev=896444&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
Wed Jan  6 13:42:52 2010
@@ -0,0 +1,61 @@
+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.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-2135">MNG-2135</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng2135PluginBuildInReactorTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng2135PluginBuildInReactorTest()
+    {
+        super( "[3.0-alpha-3,)" );
+    }
+
+    /**
+     * Test that the reactor can handle builds where one module provides a Maven plugin that
another module uses.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2135"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "plugin/target" );
+        verifier.deleteDirectory( "project/target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng2135" );
+        verifier.executeGoal( "package" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertFilePresent( "project/target/touch.txt" );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2135PluginBuildInReactorTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml?rev=896444&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
Wed Jan  6 13:42:52 2010
@@ -0,0 +1,46 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng2135</groupId>
+  <artifactId>plugin</artifactId>
+  <version>0.1</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Maven Integration Test :: MNG-2135 :: Plugin</name>
+  <description>
+    Test that the reactor can handle builds where one module provides a Maven plugin that
another module uses.
+  </description>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java?rev=896444&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
Wed Jan  6 13:42:52 2010
@@ -0,0 +1,52 @@
+package coreit;
+
+/*
+ * 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 java.io.*;
+
+import org.apache.maven.plugin.*;
+
+/**
+ * @goal it
+ */
+public class ItMojo
+    extends AbstractMojo
+{
+
+    /**
+     * @parameter default-value="${project.build.directory}/touch.txt"
+     */
+    private File outputFile;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        try
+        {
+            outputFile.getParentFile().mkdirs();
+            outputFile.createNewFile();
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Failed to create touch file: " + e.getMessage(),
e );
+        }
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/plugin/src/main/java/coreit/ItMojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml?rev=896444&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
Wed Jan  6 13:42:52 2010
@@ -0,0 +1,40 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng2135</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2135</name>
+  <description>
+    Test that the reactor can handle builds where one module provides a Maven plugin that
another module uses.
+  </description>
+
+  <modules>
+    <!-- NOTE: Deliberately ordered in reverse build order to check project sorting by
Maven -->
+    <module>project</module>
+    <module>plugin</module>
+  </modules>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml?rev=896444&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml
Wed Jan  6 13:42:52 2010
@@ -0,0 +1,53 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng2135</groupId>
+  <artifactId>project</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-2135 :: Project</name>
+  <description>
+    Test that the reactor can handle builds where one module provides a Maven plugin that
another module uses.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.mng2135</groupId>
+        <artifactId>plugin</artifactId>
+        <version>0.1</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>it</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2135/project/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message