Author: bentmann
Date: Thu Mar 11 16:47:32 2010
New Revision: 921930

URL: http://svn.apache.org/viewvc?rev=921930&view=rev
Log:
[MNG-4586] Plugin prefix can't be resolved from plugin management if management 
entry is missing plugin version

o Added IT

Added:
    
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.java
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/pom.xml
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.jar
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
   (with props)
    
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/settings-template.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=921930&r1=921929&r2=921930&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
 Thu Mar 11 16:47:32 2010
@@ -85,6 +85,7 @@ public class IntegrationTestSuite
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- 
MNG-3137
 
+        suite.addTestSuite( 
MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.class );
         suite.addTestSuite( 
MavenITmng4580ProjectLevelPluginDepUsedForCliInvocInReactorTest.class );
         suite.addTestSuite( 
MavenITmng4572ModelVersionSurroundedByWhitespaceTest.class );
         suite.addTestSuite( MavenITmng4561MirroringOfPluginRepoTest.class );

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.java
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.java?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.java
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest.java
 Thu Mar 11 16:47:32 2010
@@ -0,0 +1,64 @@
+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-4586";>MNG-4586</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4586PluginPrefixResolutionFromVersionlessPluginMngtTest()
+    {
+        super( "[3.0-alpha-8,)" );
+    }
+
+    /**
+     * Verify that plugin prefixes can be resolved from the POM's plugin 
management even if the POM
+     * does not specify the plugin version.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/mng-4586" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4586" );
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", 
verifier.newDefaultFilterProperties() );
+        verifier.getCliOptions().add( "--settings" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.executeGoal( "mng4586:touch" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        verifier.assertFilePresent( "target/touch.txt" );
+    }
+
+}

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

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

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/pom.xml?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/pom.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/pom.xml
 Thu Mar 11 16:47:32 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.mng4586</groupId>
+  <artifactId>test</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: MNG-4586</name>
+  <description>
+    Verify that plugin prefixes can be resolved from the POM's plugin 
management even if the POM
+    does not specify the plugin version.
+  </description>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.mng4586</groupId>
+          <artifactId>maven-mng4586-plugin</artifactId>
+          <!-- NOTE: version deliberately omitted -->
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

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

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

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
 Thu Mar 11 16:47:32 2010
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <plugins>
+    <plugin>
+      <name>Maven Integration Test Plugin :: Touch</name>
+      <prefix>mng4586</prefix>
+      <artifactId>maven-mng4586-plugin</artifactId>
+    </plugin>
+  </plugins>
+</metadata>

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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

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

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/0.1/maven-mng4586-plugin-0.1.pom
 Thu Mar 11 16:47:32 2010
@@ -0,0 +1,69 @@
+<?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 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.mng4586</groupId>
+  <artifactId>maven-mng4586-plugin</artifactId>
+  <version>0.1</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Maven Integration Test Plugin :: Touch</name>
+  <description>
+    A test plugin that creates an empty file.
+  </description>
+  <inceptionYear>2009</inceptionYear>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+
+  <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>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>.</directory>
+        <includes>
+          <include>pom.xml</include>
+          <include>src/**</include>
+        </includes>
+      </resource>
+      <resource>
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
+  </build>
+</project>

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
 Thu Mar 11 16:47:32 2010
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.apache.maven.its.mng4586</groupId>
+  <artifactId>maven-mng4586-plugin</artifactId>
+  <version>0.1</version>
+  <versioning>
+    <latest>0.1</latest>
+    <release>0.1</release>
+    <versions>
+      <version>0.1</version>
+    </versions>
+    <lastUpdated>20100311162255</lastUpdated>
+  </versioning>
+</metadata>

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/repo/org/apache/maven/its/mng4586/maven-mng4586-plugin/maven-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/settings-template.xml
URL: 
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/settings-template.xml?rev=921930&view=auto
==============================================================================
--- 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/settings-template.xml
 (added)
+++ 
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4586/settings-template.xml
 Thu Mar 11 16:47:32 2010
@@ -0,0 +1,55 @@
+<?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>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>maven-core-it</id>
+          <url>@baseurl@/repo</url>
+          <releases>
+            <checksumPolicy>ignore</checksumPolicy>
+          </releases>
+          <snapshots>
+            <enabled>false</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+  <activeProfiles>
+    <activeProfile>maven-core-it-repo</activeProfile>
+  </activeProfiles>
+</settings>

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

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


Reply via email to