ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burkhardt Stefan (CI/TMP)" <>
Subject AW: AW: Ivy classpath creation
Date Thu, 16 Oct 2008 11:00:35 GMT
I now constructing the classpath with the following command:

       <path id="test.classpath"/>
       <ivy:cachepath pathid="test.classpath"/>
       <pathconvert property="ivy.lib.classpath" pathsep=":">
           <path refid="test.classpath"/>
           <regexpmapper from="([.\s\w\-]*)[\\/]jars[\\/]([.\s\w\-\d]*).jar" to="lib/\2.jar"/>
       <echo message="Cachepath: "/>
       <echo message="${ivy.lib.classpath}"/> 


-----Ursprüngliche Nachricht-----
Von: Maarten Coene [] 
Gesendet: Mittwoch, 15. Oktober 2008 22:25
Betreff: Re: AW: Ivy classpath creation

I don't think this is possible at the moment with Ivy. Please open a JIRA request for this.
However, in your example where you have a flat retrieve directory (no subdirs), you could
accomplisch such a path by using the <ivy:cachepath> and <pathconvert> tasks,
something like this:

<ivy:cachepath pathid="cache.classpath"... />

<pathconvert refid="cache.classpath" property="converted.path" ... >
              <globmapper from="*" to="lib/*" casesensitive="no"/>
<path id="lib.path">
    <pathelement path="${converted.path}"/>

I didn't test it, but you can see the main idea...


----- Original Message ----
From: Burkhardt Stefan (CI/TMP) <>
Sent: Wednesday, October 15, 2008 3:30:13 PM
Subject: AW: Ivy classpath creation


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.


-----Ursprüngliche Nachricht-----
Von: Nicolas Lalevée [] 
Gesendet: Dienstag, 14. Oktober 2008 17:29
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:

> 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.



View raw message