maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1059264 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4973/ resources/mng-4973/repo/ resources/mng-4973/repo/org/ resources/mng-4973/repo/org/apache/ resources/mng-4973/repo/org/...
Date Sat, 15 Jan 2011 05:21:17 GMT
Author: bentmann
Date: Sat Jan 15 05:21:16 2011
New Revision: 1059264

URL: http://svn.apache.org/viewvc?rev=1059264&view=rev
Log:
[MNG-4973] [regression] Build extensions are invisible to plugins in multi module build

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4973ExtensionVisibleToPluginInReactorTest.java
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/0.1/dep-0.1-it.jar
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/settings-template.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/pom.xml
  (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/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=1059264&r1=1059263&r2=1059264&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
Sat Jan 15 05:21:16 2011
@@ -84,6 +84,7 @@ public class IntegrationTestSuite
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
         suite.addTestSuite( MavenITmng4975ProfileInjectedPluginExecutionOrderTest.class );
+        suite.addTestSuite( MavenITmng4973ExtensionVisibleToPluginInReactorTest.class );
         suite.addTestSuite( MavenITmng4966AbnormalUrlPreservationTest.class );
         suite.addTestSuite( MavenITmng4960MakeLikeReactorResumeTest.class );
         suite.addTestSuite( MavenITmng4955LocalVsRemoteSnapshotResolutionTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4973ExtensionVisibleToPluginInReactorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4973ExtensionVisibleToPluginInReactorTest.java?rev=1059264&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4973ExtensionVisibleToPluginInReactorTest.java
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4973ExtensionVisibleToPluginInReactorTest.java
Sat Jan 15 05:21:16 2011
@@ -0,0 +1,67 @@
+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;
+import java.util.Properties;
+
+/**
+ * This is a test set for <a href="http://jira.codehaus.org/browse/MNG-4973">MNG-4973</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4973ExtensionVisibleToPluginInReactorTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4973ExtensionVisibleToPluginInReactorTest()
+    {
+        super( "[2.0.3,3.0-alpha-1),[3.0.3,)" );
+    }
+
+    /**
+     * Verify that a given plugin within a reactor build gets run with the proper class loader
that is wired to
+     * the extensions of the current module. More technically speaking, the plugin class
realm cache must be keyed
+     * by the current project and its build extensions as well.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4973"
);
+
+        Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "sub-b/target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4973" );
+        verifier.getCliOptions().add( "-s" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties()
);
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        Properties props = verifier.loadProperties( "sub-b/target/artifact.properties" );
+        assertNotNull( props.get( "org.apache.maven.its.mng4973:dep:it-artifact:it:0.1" )
);
+    }
+
+}

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/pom.xml?rev=1059264&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/pom.xml
Sat Jan 15 05:21:16 2011
@@ -0,0 +1,42 @@
+<?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.mng4973</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4973</name>
+  <description>
+    Verify that a given plugin within a reactor build gets run with the proper class loader
that is wired to
+    the extensions of the current module. More technically speaking, the plugin class realm
cache must be keyed
+    by the current project and its build extensions as well.
+  </description>
+
+  <modules>
+    <!-- both modules run the same plugin, sub-a uses no build extension, sub-d does -->
+    <module>sub-a</module>
+    <module>sub-b</module>
+  </modules>
+</project>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/0.1/dep-0.1-it.jar
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/0.1/dep-0.1-it.jar?rev=1059264&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/repo/org/apache/maven/its/mng4973/dep/0.1/dep-0.1-it.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/settings-template.xml?rev=1059264&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/settings-template.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/settings-template.xml
Sat Jan 15 05:21:16 2011
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>maven-core-it-repo</id>
+      <repositories>
+        <repository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/pom.xml?rev=1059264&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-a/pom.xml
Sat Jan 15 05:21:16 2011
@@ -0,0 +1,64 @@
+<?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.mng4973</groupId>
+  <artifactId>sub-a</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4973 :: Sub-A</name>
+  <description>
+    Verify that a given plugin within a reactor build gets run with the proper class loader
that is wired to
+    the extensions of the current module. More technically speaking, the plugin class realm
cache must be keyed
+    by the current project and its build extensions as well.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>resolve</goal>
+            </goals>
+            <configuration>
+              <dependencies>
+                <dependency>
+                  <groupId>org.apache.maven.its.plugins</groupId>
+                  <artifactId>maven-it-plugin-artifact</artifactId>
+                  <version>2.1-SNAPSHOT</version>
+                </dependency>
+              </dependencies>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/pom.xml?rev=1059264&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/pom.xml
(added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4973/sub-b/pom.xml
Sat Jan 15 05:21:16 2011
@@ -0,0 +1,73 @@
+<?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.mng4973</groupId>
+  <artifactId>sub-b</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: MNG-4973 :: Sub-B</name>
+  <description>
+    Verify that a given plugin within a reactor build gets run with the proper class loader
that is wired to
+    the extensions of the current module. More technically speaking, the plugin class realm
cache must be keyed
+    by the current project and its build extensions as well.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-artifact</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>resolve</goal>
+            </goals>
+            <configuration>
+              <propertiesFile>target/artifact.properties</propertiesFile>
+              <dependencies>
+                <dependency>
+                  <groupId>org.apache.maven.its.mng4973</groupId>
+                  <artifactId>dep</artifactId>
+                  <version>0.1</version>
+                  <!-- Proper resolution of this type requires the extension below -->
+                  <type>it-artifact</type>
+                </dependency>
+              </dependencies>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-packaging</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <extensions>true</extensions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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



Mime
View raw message