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 2009/09/11 23:14:33 UTC

svn commit: r814033 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/mng-4355/ resources/mng-4355/repo/ resources/mng-4355/repo/org/ resources/mng-4355/repo/org/apache/ resources/mng-4355/repo/org/a...

Author: bentmann
Date: Fri Sep 11 21:14:26 2009
New Revision: 814033

URL: http://svn.apache.org/viewvc?rev=814033&view=rev
Log:
[MNG-4355] [regression] Extensions without version in the POM are not resolved to the RELEASE artifact

o Added IT

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4355ExtensionAutomaticVersionResolutionTest.java   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/pom.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.jar   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.pom
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/maven-metadata.xml   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/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=814033&r1=814032&r2=814033&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 Fri Sep 11 21:14:26 2009
@@ -85,6 +85,7 @@
         // suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
 
+        suite.addTestSuite( MavenITmng4355ExtensionAutomaticVersionResolutionTest.class );
         suite.addTestSuite( MavenITmng4353PluginDependencyResolutionFromPomRepoTest.class );
         suite.addTestSuite( MavenITmng4350LifecycleMappingExecutionOrderTest.class );
         suite.addTestSuite( MavenITmng4349RelocatedArtifactWithInvalidPomTest.class );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4355ExtensionAutomaticVersionResolutionTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4355ExtensionAutomaticVersionResolutionTest.java?rev=814033&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4355ExtensionAutomaticVersionResolutionTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng4355ExtensionAutomaticVersionResolutionTest.java Fri Sep 11 21:14:26 2009
@@ -0,0 +1,63 @@
+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-4355">MNG-4355</a>.
+ * 
+ * @author Benjamin Bentmann
+ */
+public class MavenITmng4355ExtensionAutomaticVersionResolutionTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng4355ExtensionAutomaticVersionResolutionTest()
+    {
+        super( ALL_MAVEN_VERSIONS );
+    }
+
+    /**
+     * Test that extension declarations in the POM without an explicit version get resolved to the last release
+     * version of the extension artifact.
+     */
+    public void testit()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4355" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteArtifacts( "org.apache.maven.its.mng4355" );
+        Properties filterProps = verifier.newDefaultFilterProperties();
+        verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProps );
+        verifier.getCliOptions().add( "--settings" );
+        verifier.getCliOptions().add( "settings.xml" );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+    }
+
+}

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/pom.xml?rev=814033&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/pom.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/pom.xml Fri Sep 11 21:14:26 2009
@@ -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.mng4355</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <!-- the packaging provided by the extension below -->
+  <packaging>it-packaging</packaging>
+
+  <name>Maven Integration Test :: MNG-4355</name>
+  <description>
+    Test that extension declarations in the POM without an explicit version get resolved to the last release
+    version of the extension artifact.
+  </description>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.its.mng4355</groupId>
+        <artifactId>extension</artifactId>
+        <!-- NOTE: Intentionally no version here, Maven should automatically pick one -->
+      </extension>
+    </extensions>
+  </build>
+</project>

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

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

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.pom
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.pom?rev=814033&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.pom (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/0.1/extension-0.1.pom Fri Sep 11 21:14:26 2009
@@ -0,0 +1,47 @@
+<?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.mng4355</groupId>
+  <artifactId>extension</artifactId>
+  <version>0.1</version>
+  <packaging>jar</packaging>
+
+  <name>Maven Integration Test :: MNG-4355 :: Extension</name> 
+  <description>
+    Test that extension declarations in the POM without an explicit version get resolved to the last release
+    version of the extension artifact.
+  </description>
+  <inceptionYear>2009</inceptionYear>
+
+  <properties>
+    <maven.test.skip>true</maven.test.skip>
+  </properties>
+
+  <distributionManagement>
+    <repository>
+      <id>maven-core-it</id>
+      <url>file:///${basedir}/repo</url>
+    </repository>
+  </distributionManagement>
+</project>

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/maven-metadata.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/maven-metadata.xml?rev=814033&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/maven-metadata.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/repo/org/apache/maven/its/mng4355/extension/maven-metadata.xml Fri Sep 11 21:14:26 2009
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.apache.maven.its.mng4355</groupId>
+  <artifactId>extension</artifactId>
+  <version>0.1</version>
+  <versioning>
+    <release>0.1</release>
+    <versions>
+      <version>0.1</version>
+    </versions>
+    <lastUpdated>20090911204851</lastUpdated>
+  </versioning>
+</metadata>

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

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

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/settings-template.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/settings-template.xml?rev=814033&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/settings-template.xml (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-4355/settings-template.xml Fri Sep 11 21:14:26 2009
@@ -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-4355/settings-template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

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