I finally understood.
I copied the ivysettings.xml file from the jar and made a small modification. Note that the former include dots in the XML file in ivy ${ivy.lib.dir} , and not in ${ivy.default.settings.dir} :
<ivysettings> <settings defaultResolver="default"/> <include file="${ivy.lib.dir}/ivysettings-public.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/> </ivysettings>
I have my own ivysettings-public.xml , which is the same as the default, but now defines root in my repository. (Yes, now this is a local host, but I will install it on the actual server, as soon as everything works out):
<ivysettings> <resolvers> <ibiblio name="public" m2compatible="true" root="http://localhost:8081/artifactory/repo" /> </resolvers> </ivysettings>
Now, in my build.xml , I have the following:
<property name="ivy.lib.dir" value="${basedir}/ivy.lib"/> <taskdef uri="ivylib:org.apache.ivy.ant" resource="org/apache/ivy/ant/antlib.xml"> <classpath> <fileset dir="${ivy.lib.dir}"> <include name="ivy.jar"/> <include name="ivy-*.jar"/> </fileset> </classpath> </taskdef> <ivy:configure file="${ivy.lib.dir}/ivysettings.xml" override="true"/>
This seems like a trick.
David W.
source share