You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2012/12/21 00:11:40 UTC
svn commit: r1424745 - in /ant/ivy/core/trunk: ./
src/java/org/apache/ivy/plugins/resolver/
test/repositories/m2/org/apache/test-SNAPSHOT1/
test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/
Author: maartenc
Date: Thu Dec 20 23:11:40 2012
New Revision: 1424745
URL: http://svn.apache.org/viewvc?rev=1424745&view=rev
Log:
FIX: Ivy generates wrong revision in URL for Maven snapshots (IVY-1396)
Added:
ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/
ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/maven-metadata.xml
ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar
ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/maven-metadata.xml
Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1424745&r1=1424744&r2=1424745&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Dec 20 23:11:40 2012
@@ -142,6 +142,7 @@ for detailed view of each issue, please
- IMPROVEMENT: add support for source bundles from p2 repositories
- IMPROVEMENT: add support for source URI from OBR repositories
+- FIX: Ivy generates wrong revision in URL for Maven snapshots (IVY-1396)
- FIX: Maven2: resolve failure when parent has <dependencyManagement> with dependency in 'import' scope (IVY-1376)
- FIX: IvyPublish fails when using extend tags with no explicit location attribute (IVY-1391)
- FIX: Properly handle evicted nodes in ResolveReport
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java?rev=1424745&r1=1424744&r2=1424745&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java Thu Dec 20 23:11:40 2012
@@ -397,14 +397,16 @@ public class IBiblioResolver extends URL
for (Iterator iter = revs.iterator(); iter.hasNext();) {
String rev = (String) iter.next();
ModuleRevisionId historicalMrid = ModuleRevisionId.newInstance(mrid, rev);
+
+ String patternForRev = pattern;
if (rev.endsWith("SNAPSHOT")) {
String snapshotVersion = findSnapshotVersion(historicalMrid);
if (snapshotVersion != null) {
- pattern = pattern.replaceFirst("\\-\\[revision\\]", "-" + snapshotVersion);
+ patternForRev = pattern.replaceFirst("\\-\\[revision\\]", "-" + snapshotVersion);
}
}
String resolvedPattern = IvyPatternHelper.substitute(
- pattern, historicalMrid, artifact);
+ patternForRev, historicalMrid, artifact);
try {
Resource res = repository.getResource(resolvedPattern);
if ((res != null) && res.exists()) {
Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/maven-metadata.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/maven-metadata.xml?rev=1424745&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/maven-metadata.xml (added)
+++ ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/maven-metadata.xml Thu Dec 20 23:11:40 2012
@@ -0,0 +1,32 @@
+<?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.
+-->
+<metadata>
+ <groupId>org.apache</groupId>
+ <artifactId>test-SNAPSHOT1</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <versioning>
+ <snapshot>
+ <timestamp>20070310.181613</timestamp>
+
+ <buildNumber>3</buildNumber>
+ </snapshot>
+ <lastUpdated>20070310181754</lastUpdated>
+ </versioning>
+</metadata>
\ No newline at end of file
Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar?rev=1424745&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar (added)
+++ ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.jar Thu Dec 20 23:11:40 2012
@@ -0,0 +1 @@
+
Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom?rev=1424745&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom (added)
+++ ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/2.0.0-SNAPSHOT/test-SNAPSHOT1-2.0.0-20070310.181613-3.pom Thu Dec 20 23:11:40 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ 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</groupId>
+ <artifactId>test-SNAPSHOT1</artifactId>
+ <name>Test Module for Ivy M2 parsing</name>
+ <version>2.0.0-SNAPSHOT</version>
+</project>
Modified: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/maven-metadata.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/maven-metadata.xml?rev=1424745&r1=1424744&r2=1424745&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/maven-metadata.xml (original)
+++ ant/ivy/core/trunk/test/repositories/m2/org/apache/test-SNAPSHOT1/maven-metadata.xml Thu Dec 20 23:11:40 2012
@@ -23,6 +23,7 @@
<version>2.0.2-SNAPSHOT</version>
<versioning>
<versions>
+ <version>2.0.0-SNAPSHOT</version>
<version>2.0.2-SNAPSHOT</version>
</versions>