Author: brianf Date: Tue Mar 11 14:11:00 2008 New Revision: 636103 URL: http://svn.apache.org/viewvc?rev=636103&view=rev Log: MNG-2972: new IT
Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2972OverridePluginDependency.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/readme.txt maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/pom.xml maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/Dep.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/pom.xml maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/Dep.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/pom.xml maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/pom.xml maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/ (with props) maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/pom.xml Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2972OverridePluginDependency.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2972OverridePluginDependency.java?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2972OverridePluginDependency.java (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng2972OverridePluginDependency.java Tue Mar 11 14:11:00 2008 @@ -0,0 +1,84 @@ +package org.apache.maven.integrationtests; + +import java.io.File; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import junit.framework.Assert; + +import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException; +import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase; +import org.apache.maven.it.Verifier; +import org.apache.maven.it.util.ResourceExtractor; + + +public class MavenITmng2972OverridePluginDependency + extends AbstractMavenIntegrationTestCase +{ + public MavenITmng2972OverridePluginDependency() + throws InvalidVersionSpecificationException + { + super( "(2.0.8,)" ); + } + + public void testitMNG2972 () + throws Exception + { + + + // The testdir is computed from the location of this + // file. + File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng2972-overridingPluginDependency" ); + + Verifier verifier; + + /* + * We must first make sure that any artifact created + * by this test has been removed from the local + * repository. Failing to do this could cause + * unstable test results. Fortunately, the verifier + * makes it easy to do this. + */ + verifier = new Verifier( testDir.getAbsolutePath() ); + verifier.deleteArtifact( "org.apache.maven.its.mng2972", "user", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.mng2972", "mojo", "0.0.1-SNAPSHOT", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.mng2972", "dep", "1.0", "jar" ); + verifier.deleteArtifact( "org.apache.maven.its.mng2972", "dep", "2.0", "jar" ); + + verifier = new Verifier( new File(testDir.getAbsolutePath(),"dep1").getAbsolutePath() ); + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + + verifier = new Verifier( new File(testDir.getAbsolutePath(),"dep2").getAbsolutePath() ); + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + + verifier = new Verifier( new File(testDir.getAbsolutePath(),"mojo").getAbsolutePath() ); + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + + verifier = new Verifier( new File(testDir.getAbsolutePath(),"user").getAbsolutePath() ); + verifier.executeGoal( "validate" ); + verifier.verifyErrorFreeLog(); + + List lines = verifier.loadFile( new File(testDir.getAbsolutePath(),"user").getAbsolutePath() , "log.txt", false ); + int foundVersionOne = 0; + int foundVersionTwo = 0; + for ( Iterator i = lines.iterator(); i.hasNext(); ) + { + + String line = (String) i.next(); + if ( line.indexOf( "MNG-2972-VERSION-1" ) != -1 ) + foundVersionOne++; + if ( line.indexOf( "MNG-2972-VERSION-2" ) != -1 ) + foundVersionTwo++; + } + + verifier.resetStreams(); + + Assert.assertEquals( "Should not be using plugin dependency version 1", 0,foundVersionOne ); + Assert.assertEquals( "Should be using plugin version 2 once.", 1,foundVersionTwo ); + + } +} Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/readme.txt URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/readme.txt?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/readme.txt (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/MNG-3426/readme.txt Tue Mar 11 14:11:00 2008 @@ -0,0 +1 @@ +There is another test under MNG-2972 that also reproduces this without external dependencies. The test contained here relies on castor. \ No newline at end of file Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1,5 @@ +.classpath +.project +.settings +target +target-eclipse Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/pom.xml?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/pom.xml (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/pom.xml Tue Mar 11 14:11:00 2008 @@ -0,0 +1,18 @@ +<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.its.mng2972</groupId> + <artifactId>dep</artifactId> + <packaging>jar</packaging> + <version>1.0</version> + <name>dep1</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1 @@ +test Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/Dep.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/Dep.java?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/Dep.java (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep1/src/main/java/its/Dep.java Tue Mar 11 14:11:00 2008 @@ -0,0 +1,9 @@ +package its; + +public class Dep +{ + public static void main() + { + System.out.println( "MNG-2972-VERSION-1" ); + } +} Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1 @@ +target Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/pom.xml?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/pom.xml (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/pom.xml Tue Mar 11 14:11:00 2008 @@ -0,0 +1,18 @@ +<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.its.mng2972</groupId> + <artifactId>dep</artifactId> + <packaging>jar</packaging> + <version>2.0</version> + <name>dep1</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1 @@ +test Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/Dep.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/Dep.java?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/Dep.java (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/dep2/src/main/java/its/Dep.java Tue Mar 11 14:11:00 2008 @@ -0,0 +1,9 @@ +package its; + +public class Dep +{ + public static void main() + { + System.out.println( "MNG-2972-VERSION-2" ); + } +} Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1,5 @@ +.classpath +.project +.settings +target +target-eclipse Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/pom.xml?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/pom.xml (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/pom.xml Tue Mar 11 14:11:00 2008 @@ -0,0 +1,28 @@ +<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.its.mng2972</groupId> + <artifactId>mng2972</artifactId> + <packaging>maven-plugin</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>mng2972 Maven Mojo</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven.its.mng2972</groupId> + <artifactId>dep</artifactId> + <version>1.0</version> + </dependency> + </dependencies> +</project> Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mng2972/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java Tue Mar 11 14:11:00 2008 @@ -0,0 +1,36 @@ +package org.apache.maven.its.mng2972.mng2972; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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 its.Dep; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +/** + * @goal test + * @phase process-sources + */ +public class MyMojo + extends AbstractMojo +{ + public void execute() + throws MojoExecutionException + { + Dep.main(); + } +} Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1,5 @@ +.classpath +.project +.settings +target +target-eclipse Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/pom.xml?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/pom.xml (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/pom.xml Tue Mar 11 14:11:00 2008 @@ -0,0 +1,28 @@ +<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.its.mng2972</groupId> + <artifactId>mojo</artifactId> + <packaging>maven-plugin</packaging> + <version>0.0.1-SNAPSHOT</version> + <name>mng2972 Maven Mojo</name> + <url>http://maven.apache.org</url> + <dependencies> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.maven.its.mng2972</groupId> + <artifactId>dep</artifactId> + <version>1.0</version> + </dependency> + </dependencies> +</project> Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/mojo/src/main/java/org/apache/maven/its/mng2972/mng2972/MyMojo.java Tue Mar 11 14:11:00 2008 @@ -0,0 +1,36 @@ +package org.apache.maven.its.mng2972.mng2972; + +/* + * Copyright 2001-2005 The Apache Software Foundation. + * + * Licensed 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 its.Dep; + +import org.apache.maven.plugin.AbstractMojo; +import org.apache.maven.plugin.MojoExecutionException; + +/** + * @goal test + * @phase process-sources + */ +public class MyMojo + extends AbstractMojo +{ + public void execute() + throws MojoExecutionException + { + Dep.main(); + } +} Propchange: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Mar 11 14:11:00 2008 @@ -0,0 +1,4 @@ +.classpath +.project +.settings +target-eclipse Added: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/pom.xml?rev=636103&view=auto ============================================================================== --- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/pom.xml (added) +++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/mng2972-overridingPluginDependency/user/pom.xml Tue Mar 11 14:11:00 2008 @@ -0,0 +1,37 @@ +<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.its.mng2972</groupId> + <artifactId>user</artifactId> + <packaging>jar</packaging> + <version>1.0</version> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.its.mng2972</groupId> + <artifactId>mojo</artifactId> + <version>0.0.1-SNAPSHOT</version> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>test</goal> + </goals> + </execution> + </executions> + <!--this should override a dependency in the plugin. If successfull, it will prong MNG-2972-VERSION-2--> + <dependencies> + <dependency> + <groupId>org.apache.maven.its.mng2972</groupId> + <artifactId>dep</artifactId> + <version>2.0</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + + + +</project> + +