Reputation: 3041
Disclaimer: I am a newbie using Ant + Ivy
I have the following eclipse configuration :
ProjectA depends on ProjectB and ProjectC
ProjectB depends on ProjectC
Each project has its owns ivy.xml file.
ProjectA has a build.xml file like this:
(...)
<ivy:resolve file="../ProjectC/ivy.xml" />
<ivy:cachepath pathid="ivy.deps.default" conf="default" />
<ivy:cachefileset setid="ivy.deps.default.fileset" conf="default"/>
<ivy:resolve file="../ProjectB/ivy.xml" />
<ivy:cachepath pathid="ivy.deps.default" conf="default" />
<ivy:cachefileset setid="ivy.deps.default.fileset" conf="default"/>
<ivy:resolve file="ivy.xml" />
<ivy:cachepath pathid="ivy.deps.default" conf="default" />
<ivy:cachefileset setid="ivy.deps.default.fileset" conf="default"/>
<path id="classpath">
<fileset dir="${webroot}/WEB-INF/lib" erroronmissingdir="no">
<include name="*.jar"/>
</fileset>
<fileset dir="${libraries}" erroronmissingdir="no">
<include name="*.jar"/>
</fileset>
<path refid="ivy.deps.default"/>
</path>
(...)
<javac destdir="c:/abc" includeantruntime="yes" classpathref="ivy.deps.default">
<src path="../ProjectC/src"/>
<classpath refid="classpath"/>
</javac>
(... Compile ProjectB ...)
(... Compile ProjectA ...)
So, running this build.xml results in error, saying that ProjectC could not compile because it was missing a *.jar file that should have been resolved by ivy:resolve command.
My question is:
Upvotes: 1
Views: 1416
Reputation: 366
Looks like you have an ivy file for each project, but you do not have a build file for each project. As Mark said in the above comment, each project should build individually.
For example:
<resolvers>
list so that IVY looks for dependencies thereThat should get you off to the races!
Pro Tip: instead of a "SharedLibrary" directory, consider using something like Artifactory to manage the artifacts and pull from there instead.
Upvotes: 1