[
https://issues.apache.org/jira/browse/IVY-1661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18011462#comment-18011462
]
Eric Milles commented on IVY-1661:
----------------------------------
https://github.com/apache/ant-ivy/pull/109
> ivy:deliver is writing dependency version from another conf
> -----------------------------------------------------------
>
> Key: IVY-1661
> URL: https://issues.apache.org/jira/browse/IVY-1661
> Project: Ivy
> Issue Type: Bug
> Components: Ant
> Affects Versions: 2.5.3
> Reporter: Eric Milles
> Priority: Major
> Attachments: IvyBug.zip
>
>
> When delivering the ivy.xml below, the commons-lang3 dependency is delivered
> with revision 3.3.2 instead of 3.18.0. This stems from some kind of crosstalk
> between confs. Moving the {{<conf name="main"/>}} below the "build" conf gets
> 3.18.0 as expected.
> ivysettings.xml
> {code:xml}
> <ivysettings>
> <caches>
> <cache name="maven-cache" basedir="${ivy.home}/maven-cache" />
> </caches>
> <resolvers>
> <ibiblio name="Maven Central" cache="maven-cache"
> m2compatible="true" useMavenMetadata="false">
> </ibiblio>
> </resolvers>
> <settings defaultResolver="Maven Central" />
> </ivysettings>
> {code}
> ivy.xml
> {code:xml}
> <ivy-module version="2.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> <info organisation="foo" module="bar" />
> <configurations>
> <conf name="main" />
> <conf name="build" visibility="private"
> description="Artifacts necessary for Ant build" />
> </configurations>
> <dependencies defaultconf="main" defaultconfmapping="*->master,runtime()">
> <dependency org="org.apache.commons" name="commons-lang3"
> rev="3.18.0" />
> <dependency org="net.sourceforge.cobertura" name="cobertura"
> rev="2.1.1" conf="build" />
> </dependencies>
> </ivy-module>
> {code}
> ant.xml
> {code:xml}
> <project default="build" name="Ivy bug build">
> <target name="build" xmlns:ivy="antlib:org.apache.ivy.ant">
> <delete dir="build" quiet="true" />
> <taskdef resource="org/apache/ivy/ant/antlib.xml"
> uri="antlib:org.apache.ivy.ant">
> <classpath>
> <fileset file="ivy-*.jar" />
> </classpath>
> </taskdef>
> <ivy:settings file="ivysettings.xml" />
> <ivy:retrieve file="ivy.xml"
> pattern="build/libs/[conf]/[artifact]-[revision](-[classifier]).[ext]" />
> <ivy:deliver conf="*(public)" deliverpattern="build/[artifact].[ext]"
> generateRevConstraint="false" />
> </target>
> </project>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)