ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <>
Subject RE: Ant Compilation Referencing Local Repository
Date Wed, 09 Jan 2008 16:47:34 GMT
When you do your retrieve, you can specify in the pattern attribute where you want those dependencies
to go.  I make it go to a subdirectory called dependencies with:

<ivy:retrieve pattern="${basedir}/dependencies/[module]/[type]/[artifact].[ext]" ivypattern="${basedir}/dependencies/[module]/[type]/[artifact].[ext]"/>

I then setup my classpath:

                <path id="compileJavaClassPath">
                        <pathelement location="${basedir}/build/classes"/>
                        <fileset dir="${basedir}/dependencies">
                                <include name="**/jar/*.jar"/>

I then compile with:

                <javac srcdir="${basedir}/src" destdir="${basedir}/build/classes" source="1.5"
includeAntRuntime="true" sourcepath="" debug="true" fork="true" memoryMaximumSize="512m">
                                <pathelement location="${basedir}/src"/>
                                <path refid="compileJavaClassPath"/>

Shawn Castrianni

-----Original Message-----
From: lukasbradley []
Sent: Wednesday, January 09, 2008 9:59 AM
Subject: Ant Compilation Referencing Local Repository


I'm attempting to do something that seems like it should be simple, but I
can't find any straight documentation for it.

I've successfully gotten the Ant ivy:retrieve task to work.  Now, I would
love to run a javac task using a classpath referencing the ivy.xml specified
libraries.  The only examples I can find are copying those libraries to the
project's lib directory (or somewhere else), and compiling as normal.  This
seems redundant.

Is what I'm trying to do possible?

Thank you for any and all help.


View this message in context:
Sent from the ivy-user mailing list archive at

This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.

View raw message