ant-ivy-user mailing list archives

Ivy only work if called outside the build.file where the ivy ant tasks are!!!

Date

Fri, 13 Jun 2008 16:08:43 GMT

Something funny is happening with me. When I have a build file 'B' that calls
another build file 'A' that uses ivy tasks, everything goes smoothly. But if
try to use 'A' directly I get the following error:
BUILD FAILED
/home/novaspy/eclipse-workspace/projectA/build.xml:23: Problem: failed to
create task or type antlib:org.apache.ivy.ant:settings
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-/home/deco/eclipse/plugins/org.apache.ant_1.7.0.v200706080842/lib
-/home/deco/.ant/lib
-a directory added on the command line with the -lib argument
If I call 'A' from another build file 'B', it works perfectly. I checked and
the Ivy.jar is in the ant.lib directory
The Ivy code in the 'A' build file:
<path id="classpath.dependencies">
<fileset dir="${lib.root}" />
</path>
<!-- ivy properties used -->
<property name="ivy.settings.dir" value="${basedir}/../projectB/settings"
/>
<property file="${ivy.settings.dir}/ivysettings.properties" />
<!-- here is how we would have configured ivy if we had our own
ivysettings file -->
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
<!-- =================================
target: resolve
================================= -->
<target name="resolve" depends="clean-lib" description="--> resolve and
retrieve dependencies with ivy">
<ivy:retrieve pattern="${lib.root}/[artifact].[ext]" />
</target>
<!-- =================================
target: clean-lib
================================= -->
<target name="clean-lib" description="--> clean the project libraries
directory (dependencies)">
<delete includeemptydirs="true" dir="${lib.root}"/>
</target>
--
View this message in context: http://www.nabble.com/Ivy-only-work-if-called-outside-the-build.file-where-the-ivy-ant-tasks-are%21%21%21-tp17826941p17826941.html
Sent from the ivy-user mailing list archive at Nabble.com.