Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0-alpha-2
-
None
-
None
-
Ivy 2.0.0-alpha2-incubating
Ant 1.7.0
Sun JDK 1.5.0_12
Description
I'm using
<ivy:retrieve pattern="${deps.dir}/[conf]/[originalname].[ext]" sync="true"/>
With the following resolver definitions:
<resolvers>
<!-- We define two resolvers and chain them to form our normal resolver.
The first is for thirdparty libraries, and the second is for libraries we build ourselves.
The chain looks first in thirdparty libraries, and then in ours. The first found is used. -->
<filesystem name="thirdparty-libs">
<ivy pattern="${top.dir}/thirdparty/libraries/[module](-[revision])/ivy.xml"/>
<!-- Patterns for thirdparty libs; in preferred resolution ordering. -->
<artifact pattern="${top.dir}/thirdparty/libraries/[module][revision]/dist/[artifact][revision].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[module]-[revision]/dist/[artifact].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[module]/dist/[artifact].[ext]"/>
<!-- Also supported patterns: resolution of artifacts grouped by organization and module or only organization. -->
<artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/[module]/dist/[artifact].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/dist/[artifact].[ext]"/>
</filesystem>
<!-- Workaround for JIRA IVY-630 -->
<filesystem name="thirdparty-libs-no-ivy">
<!-- Patterns for thirdparty libs; in preferred resolution ordering. -->
<artifact pattern="${top.dir}/thirdparty/libraries/[module][revision]/dist/[artifact][revision].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[module]-[revision]/dist/[artifact].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[module]/dist/[artifact].[ext]"/>
<!-- Also supported patterns: resolution of artifacts grouped by organization and module or only organization. -->
<artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/[module]/dist/[artifact].[ext]"/>
<artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/dist/[artifact].[ext]"/>
</filesystem>
<filesystem name="our-libs">
<ivy pattern="${top.dir}/libraries/[module]/ivy.xml"/>
<!-- Ivy bug or lack of understanding: using optional revision (-[revision]) here doesn't work right.
So we need two separate patterns. -->
<artifact pattern="${top.dir}/libraries/[module]/build/dist/[organisation][artifact][revision].[ext]"/>
<artifact pattern="${top.dir}/libraries/[module]/build/dist/[organisation]-[artifact].[ext]"/>
<artifact pattern="${top.dir}/libraries/[module]/build/dist/[artifact]-[revision].[ext]"/>
<artifact pattern="${top.dir}/libraries/[module]/build/dist/[artifact].[ext]"/>
</filesystem>
<chain name="localtree" returnFirst="true">
<resolver ref="thirdparty-libs"/>
<resolver ref="thirdparty-libs-no-ivy"/>
<resolver ref="our-libs"/>
</chain>
</resolvers>
The behavior I am seeing is that whenever the artifact is resolved using the last resolver in this chain (the resolver named "our-libs" above) the artifact gets retrieved to the proper directory but with the name (verbatim) "[originalname].jar", rather than the name with the appropriate value of "[originalname]" substituted in.
This happens in 2.0.0-alpha2-incubating but was not occurring in 1.4.1