Look at IVY-387 [1] and the related issues (and vote for it if you want).

[1] https://issues.apache.org/jira/browse/IVY-387

Gilles

2008/2/12, Brown, Carlton <[EMAIL PROTECTED]>:
>
> I think I may have found a bug, can someone confirm this behavior for
> me:
>
>
>
> It seems that the <deliver> functionality treats relative paths in an
> unexpected way.   In the deliverpattern attribute, it appears that paths
> are resolved relative to the ${user.dir} system property.  This is
> different from the usual Ant behavior of resolving them relative to
> ${basedir}.   I will describe the steps to reproduce below.
>
>
>
> In a directory called parent I have an Ant script build-parent.xml
> containing this line:
>
> <ant dir="child-dir" antfile="build-child.xml" target="publish"/>
>
>
>
> Of particular interest is the "dir" attribute, which sets the value of
> the property ${basedir} in build-child.xml to child-dir.
>
>
>
> In the build-child.xml, I have this target:
>
> <target name="publish">
>
>             <ivy:deliver
>
>             deliverpattern="output/jar/[artifact].[ext]"
>
>             settingsRef="module-settings"/>
>
> </target>
>
>
>
> The expected behavior is for the ivy file to be delivered to
> child-dir/output/jar.   This succeeds when I run the publish target
> directly from within build-child.xml.   However, it misbehaves when it
> is called via <ant> from build-parent.xml.    The ivy file is delivered
> to parent-dir/output/jar instead of child-dir.
>
>
>
> A workaround is to use absolute paths in the deliverpattern attribute by
> employing the ${basedir} property, like this:
>
> <target name="publish">
>
>             <ivy:deliver
>
>             deliverpattern="${basedir}/output/jar/[artifact].[ext]"
>
>             settingsRef="module-settings"/>
>
> </target>
>
>
>
> This makes the task work as I intend for both tests.   However, this
> shows that Ivy is not treating relative paths as they are normally
> treated in Ant, at least in the case of <deliver>.    This is also true
> of the implicit deliver that happens in <publish>, the same behavior
> occurs there.
>
>
>
> Can someone confirm whether this is a bug?
>
>
>
> Thanks,
>
> Carlton
>
>
>
>
> -----------------------------------------
> ====================================================
> This message contains PRIVILEGED and CONFIDENTIAL
> information that is intended only for use by the
> named recipient. If you are not the named recipient,
> any disclosure, dissemination, or action based on
> the contents of this message is prohibited. In such
> case please notify us and destroy and delete all
> copies of this transmission.  Thank you.
> ====================================================




-- 
Gilles Scokart

Reply via email to