You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by "Burkhardt Stefan (CI/TMP)" <St...@de.bosch.com> on 2008/10/14 17:02:52 UTC
Ivy classpath creation
Hi,
I am using the following command to get my artefacts within my
ANT-Script.
<ivy:retrieve
pattern="${basedir}/lib/[artifact]-[revision].[ext]" type="jar,source"
sync="true"/>
It retrieves the artefacts and put the jar-files into my "lib"-folder.
First Question is:
- How can I create a classpath based on the artefact resolution and not
from the directory. Is there a similar command like "cachefileset" for
the "lib" directory.
Is there a way to create a classpath from the resolution report?
Second question is:
- I am using subversion and I will check in the complete lib folder with
the jar-files. But the option "sync=true" will delete the complete
folder. So the
subversion-Folder is removed too. Any Ideas to handle this?
Stefan
AW: Ivy classpath creation
Posted by "Burkhardt Stefan (CI/TMP)" <St...@de.bosch.com>.
Hi,
The ivy:cachepath points also to the cache and not to the lib directory. The option useOrigin
makes no difference. I tried it with beta-2 and RC-1.
I need something like "lib/commons-logging-1.0.4.jar:lib/spring-2.5.5.jar:lib/spring-test-2.5.5.jar"
Am I missing something.
Stefan
-----Ursprüngliche Nachricht-----
Von: Nicolas Lalevée [mailto:nicolas.lalevee@hibnet.org]
Gesendet: Dienstag, 14. Oktober 2008 17:29
An: ivy-user@ant.apache.org
Betreff: Re: Ivy classpath creation
Le mardi 14 octobre 2008, Burkhardt Stefan (CI/TMP) a écrit :
> Hi,
>
> I am using the following command to get my artefacts within my
> ANT-Script.
> <ivy:retrieve
> pattern="${basedir}/lib/[artifact]-[revision].[ext]" type="jar,source"
> sync="true"/>
> It retrieves the artefacts and put the jar-files into my "lib"-folder.
>
> First Question is:
> - How can I create a classpath based on the artefact resolution and not
> from the directory. Is there a similar command like "cachefileset" for
> the "lib" directory.
> Is there a way to create a classpath from the resolution report?
yep, see:
http://ant.apache.org/ivy/history/latest-milestone/use/cachepath.html
>
> Second question is:
> - I am using subversion and I will check in the complete lib folder with
> the jar-files. But the option "sync=true" will delete the complete
> folder. So the
> subversion-Folder is removed too. Any Ideas to handle this?
You could just not commit your lib directory and svn:ignore it.
Nicolas
Re: Ivy classpath creation
Posted by Adrian Woodhead <ad...@last.fm>.
>> Second question is:
>> - I am using subversion and I will check in the complete lib folder with
>> the jar-files. But the option "sync=true" will delete the complete
>> folder. So the
>> subversion-Folder is removed too. Any Ideas to handle this?
>>
>
> You could just not commit your lib directory and svn:ignore it.
>
Yup, that's what we do for all our projects, and just have ant retrieve
the jars at build-time.
Re: Ivy classpath creation
Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le mardi 14 octobre 2008, Burkhardt Stefan (CI/TMP) a écrit :
> Hi,
>
> I am using the following command to get my artefacts within my
> ANT-Script.
> <ivy:retrieve
> pattern="${basedir}/lib/[artifact]-[revision].[ext]" type="jar,source"
> sync="true"/>
> It retrieves the artefacts and put the jar-files into my "lib"-folder.
>
> First Question is:
> - How can I create a classpath based on the artefact resolution and not
> from the directory. Is there a similar command like "cachefileset" for
> the "lib" directory.
> Is there a way to create a classpath from the resolution report?
yep, see:
http://ant.apache.org/ivy/history/latest-milestone/use/cachepath.html
>
> Second question is:
> - I am using subversion and I will check in the complete lib folder with
> the jar-files. But the option "sync=true" will delete the complete
> folder. So the
> subversion-Folder is removed too. Any Ideas to handle this?
You could just not commit your lib directory and svn:ignore it.
Nicolas
Re: AW: Ivy classpath creation
Posted by usiddiqi <us...@gmail.com>.
>Ivy should do that automatically if it knows the dependencies of your
referenced jar files.
Yead it does, but as i said it gives the list of only those jar files, which
are mentioned in ivy.xml
>Could you give a little more information about your setup, like:
>- what repository do you use?
Sonatype Nexus Maven Repository
- what are your settings.xml?
>i didnt specify and settings.xml explicitly
>- what is your ivy.xml?
My ivy.xml looks like that;
<dependency org="org.springframework" name="spring" rev="2.5.5" />
<dependency org="org.apache.logging" name="log4j" rev="1.2.15" />
<dependency org="org.hibernate" name="hibernate" rev="3.3.1" />
And then in my ant file...when i call <ivy:cachepath pathid="path.default"
conf="default" />, then i get the list above metioned jar files and for
example not common-lang.jar, which is used by these jars. Though it makes a
successfull build, but i need that complete list for my manifest to deploy
on the server, otherwise i will get a runtime error
thanks,
umer
--
View this message in context: http://www.nabble.com/Ivy-classpath-creation-tp19975383p20730710.html
Sent from the ivy-user mailing list archive at Nabble.com.
Re: AW: Ivy classpath creation
Posted by Maarten Coene <ma...@yahoo.com>.
Ivy should do that automatically if it knows the dependencies of your referenced jar files.
Could you give a little more information about your setup, like:
- what repository do you use?
- what are your settings.xml?
- what is your ivy.xml?
Maarten
----- Original Message ----
From: usiddiqi <us...@gmail.com>
To: ivy-user@ant.apache.org
Sent: Thursday, November 27, 2008 6:12:38 PM
Subject: Re: AW: Ivy classpath creation
Hallo,
I also have a similar problem, i am also using;
<ivy:cachepath pathid="lib.path" conf="default" />
but it gives the path of only those .jar files, which mine system used. How
can i get the complete classpath (including the other jar files, which are
used by the referenced jar files)? This is necessary for me, coz i have to
write it on the manifest file for run-time
regards,
Umer
--
View this message in context: http://www.nabble.com/Ivy-classpath-creation-tp19975383p20722734.html
Sent from the ivy-user mailing list archive at Nabble.com.
Re: AW: Ivy classpath creation
Posted by usiddiqi <us...@gmail.com>.
Hallo,
I also have a similar problem, i am also using;
<ivy:cachepath pathid="lib.path" conf="default" />
but it gives the path of only those .jar files, which mine system used. How
can i get the complete classpath (including the other jar files, which are
used by the referenced jar files)? This is necessary for me, coz i have to
write it on the manifest file for run-time
regards,
Umer
--
View this message in context: http://www.nabble.com/Ivy-classpath-creation-tp19975383p20722734.html
Sent from the ivy-user mailing list archive at Nabble.com.