You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2010/03/10 22:29:04 UTC
svn commit: r921578 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-4580/ resources/mng-4580/sub/
Author: bentmann
Date: Wed Mar 10 21:29:03 2010
New Revision: 921578
URL: http://svn.apache.org/viewvc?rev=921578&view=rev
Log:
[MNG-4580] Plugin dependencies for module ignored when building from aggregator project using direct plugin invocation
o Added IT
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/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=921578&r1=921577&r2=921578&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 Mar 10 21:29:03 2010
@@ -85,6 +85,7 @@ public class IntegrationTestSuite
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.class );
suite.addTestSuite( MavenITmng4572ModelVersionSurroundedByWhitespaceTest.class );
suite.addTestSuite( MavenITmng4561MirroringOfPluginRepoTest.class );
suite.addTestSuite( MavenITmng4554PluginPrefixMappingUpdateTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java?rev=921578&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java Wed Mar 10 21:29:03 2010
@@ -0,0 +1,71 @@
+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-4580">MNG-4580</a>.
+ *
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest()
+ {
+ super( "[3.0-alpha-8,)" );
+ }
+
+ /**
+ * Verify that project-level plugin dependencies of sub modules are still considered when a plugin is invoked
+ * directly from command line at the reactor root. In other words, the plugin realm used for a mojo execution
+ * should match the plugin dependencies as given by the current project.
+ */
+ public void testit()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4580" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.deleteDirectory( "sub/target" );
+ verifier.executeGoal( "org.apache.maven.its.plugins:maven-it-plugin-class-loader:load" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ Properties pclProps;
+
+ pclProps = verifier.loadProperties( "target/pcl.properties" );
+ assertNotNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassA" ) );
+ assertNotNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties" ) );
+
+ pclProps = verifier.loadProperties( "sub/target/pcl.properties" );
+ assertNull( pclProps.getProperty( "org.apache.maven.plugin.coreit.ClassA" ) );
+ assertNull( pclProps.getProperty( "org/apache/maven/plugin/coreit/a.properties" ) );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml?rev=921578&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml Wed Mar 10 21:29:03 2010
@@ -0,0 +1,56 @@
+<?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.mng4580</groupId>
+ <artifactId>aggregator</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: MNG-4580</name>
+ <description>
+ Verify that project-level plugin dependencies of sub modules are still considered when a plugin is invoked
+ directly from command line at the reactor root. In other words, the plugin realm used for a mojo execution
+ should match the plugin dependencies as given by the current project.
+ </description>
+
+ <modules>
+ <module>sub</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-class-loader</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <classNames>org.apache.maven.plugin.coreit.ClassA</classNames>
+ <resourcePaths>org/apache/maven/plugin/coreit/a.properties</resourcePaths>
+ <pluginClassLoaderOutput>target/pcl.properties</pluginClassLoaderOutput>
+ <contextClassLoaderOutput>target/tccl.properties</contextClassLoaderOutput>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml?rev=921578&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml Wed Mar 10 21:29:03 2010
@@ -0,0 +1,68 @@
+<?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.mng4580</groupId>
+ <artifactId>sub</artifactId>
+ <version>1.0</version>
+
+ <name>Maven Integration Test :: MNG-4580 :: Sub</name>
+ <description>
+ Verify that project-level plugin dependencies of sub modules are still considered when a plugin is invoked
+ directly from command line at the reactor root. In other words, the plugin realm used for a mojo execution
+ should match the plugin dependencies as given by the current project.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-class-loader</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.plugins.class-loader</groupId>
+ <artifactId>dep-b</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <!--
+ This exclusion should make the class/resource specified below unloadable unless Maven erroneously
+ reused the plugin realm from the top-level project to execute this mojo.
+ -->
+ <groupId>org.apache.maven.its.plugins.class-loader</groupId>
+ <artifactId>dep-a</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <classNames>org.apache.maven.plugin.coreit.ClassA</classNames>
+ <resourcePaths>org/apache/maven/plugin/coreit/a.properties</resourcePaths>
+ <pluginClassLoaderOutput>target/pcl.properties</pluginClassLoaderOutput>
+ <contextClassLoaderOutput>target/tccl.properties</contextClassLoaderOutput>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4580/sub/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision