FIX: Retrieval not expanding "[originalname]". (IVY-631)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ivy/core/trunk@591945 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maarten Coene 2007-11-05 10:18:06 +00:00
parent 7a04633175
commit 556f3174c8
4 changed files with 37 additions and 6 deletions

View File

@ -98,6 +98,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
- IMPROVEMENT: Unit test improvements (IVY-545) (thanks to Tjeerd Verhagen)
- IMPROVEMENT: Dependent jars missing in ivy binaries (IVY-481)
- FIX: Retrieval not expanding "[originalname]". (IVY-631)
- FIX: Ant target "clean" on Ivy multi-project tutorial points to wrong cache directory. (IVY-548)
- FIX: Variables not replaced during deliver (IVY-520) (thanks to John Williams)
- FIX: XmlModuleDescriptorWriter does not produce matcher attribute on include and exclude rules (IVY-556)

View File

@ -45,8 +45,6 @@ public class MDArtifact extends AbstractArtifact {
private List confs = new ArrayList();
private ArtifactRevisionId arid;
private Map extraAttributes = null;
private URL url;
@ -86,11 +84,9 @@ public class MDArtifact extends AbstractArtifact {
}
public ArtifactRevisionId getId() {
if (arid == null) {
arid = ArtifactRevisionId.newInstance(md.getResolvedModuleRevisionId(), name, type,
// do not cache the result because the resolvedModuleRevisionId can change!
return ArtifactRevisionId.newInstance(md.getResolvedModuleRevisionId(), name, type,
ext, extraAttributes);
}
return arid;
}
public String getName() {

View File

@ -207,6 +207,16 @@ public class IvyRetrieveTest extends TestCase {
assertTrue(new File(IvyPatternHelper.substitute(RETRIEVE_PATTERN, "org1", "mod1.2", "2.0",
"mod1.2", "jar", "jar")).exists());
}
public void testRetrieveWithOriginalNamePattern() throws Exception {
retrieve.setFile(new File("test/java/org/apache/ivy/ant/ivy-631.xml"));
retrieve.setConf("default");
retrieve.setPattern("build/test/lib/[conf]/[originalname].[ext]");
retrieve.setSync(true);
retrieve.execute();
assertTrue(new File("build/test/lib/default/mod1.2-2.2.jar").exists());
}
public void testFailureWithoutAPreviousResolve() throws Exception {
// we do a retrieve with the module information whereas no resolve has been previously done

View File

@ -0,0 +1,24 @@
<!--
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.
-->
<ivy-module version="1.2">
<info organisation="apache" module="613"/>
<dependencies>
<dependency org="org1" name="mod1.2" rev="latest.integration" conf="default" transitive="false" />
</dependencies>
</ivy-module>