ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GERARD JULIEN" <JGER...@groupama-cibama.fr>
Subject RE: Custom retrieve pattern.
Date Fri, 19 Oct 2007 07:38:20 GMT
My conf are very simple :

<conf name="lib" description="Librairies externes"/>
<conf name="prj" description="Dependances projets"/>

When I set the conf to 'prj->lib' the first retrieve task <ivy:retrieve useOrigin="true"
pattern="${ivy.application.dir}/[artifact]-[revision].[ext]" conf="lib" /> copy 0 jars.
The second task : <ivy:retrieve useOrigin="true" pattern="${ivy.application.dir}/[artifact].[ext]"
conf="prj" /> retrieve all dependencies but without revision version for artifact with
lib conf.

So I don't understand why the first task did not retrieve any dependencies? I certainly miss
a thing; Any idea? :)

Julien.





-----Message d'origine-----
De : Xavier Hanin [mailto:xavier.hanin@gmail.com] 
Envoyé : mercredi 17 octobre 2007 20:22
À : ivy-user@incubator.apache.org
Objet : Re: Custom retrieve pattern.

On 10/17/07, GERARD JULIEN <JGERARD@groupama-cibama.fr> wrote:
>
> Hello,
>
> first of all, congratulations to the team for the graduation!
>
> So, now my question :p
>
> I use Ivy 1.4.1. I have an ivy.xml for a top level project as
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <?xml-stylesheet type="text/xsl" href="[path]/ivy-doc.xsl"?>
> <ivy-module version="1.0">
>     <info organisation="DDD" module="Diademe" status="release"
> revision="1.0"/>
> <configurations>
>        <include file="${fichier.configurations}"/>
>     </configurations>
>     <dependencies>
>   <dependency org="DDD" name="DDDCommun" rev="1.0" conf="prj->lib" />
>   <dependency org="DDD" name="DDDService" rev="1.0" conf="prj->lib" />
> </dependencies>
>
> </ivy-module>
>
>
> The dependencies DDDCommun and DDDService have somme dependencies
> defined with conf=lib like this :
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <?xml-stylesheet type="text/xsl" href="[path]/ivy-doc.xsl"?>
> <ivy-module version="1.0">
>     <info organisation="DDD" module="DDDCommun" status="release"
> revision="1.0"/>
> <configurations>
>        <include file="${fichier.configurations}"/>
>     </configurations>
>     <dependencies>
>       <dependency org="commons-lib" name="commons-lib" rev="1.5.2"
> conf="lib->*,!dev,!bea" />
> </dependencies>
>
> </ivy-module>
>
> (n.b : the artifact with conf="prj" are stored in the repository without
> version number)
>
> When I use the task retrieve : <ivy:retrieve useOrigin="true"
> pattern="${ivy.application.dir}/[artifact]-[revision].[ext]"
> conf="prj,lib" />
>
> The task copy all jars with revision number.
> But we must have the artifacts with conf 'prj' without revision number
> and the others with revision number (production constraint :) ).
>
> I tried to use two retrieve task to do this :
> <ivy:retrieve useOrigin="true"
> pattern="${ivy.application.dir}/[artifact]-[revision].[ext]" conf="lib"
> />
> <ivy:retrieve useOrigin="true"
> pattern="${ivy.application.dir}/[artifact].[ext]" conf="prj" />
> and I modified the first ivy.xml to have the conf="prj->default" instead
> of conf="prj->lib"
>
> But in this case, only first level dependencies are retrieve?? I don't
> understand why the transitive dependencies with 'lib' conf are not
> retrieve?
>
> So, there are any solutions to have the revision number for a conf and
> no revision number for another conf when I use the retrieve task?
> May be a custom pattern like <ivy:retrieve useOrigin="true"
> pattern="${ivy.application.dir}/[originname]" conf="prj" /> and in this
> case copy the jar with the originals names in the repository?


Your approach is the good one: use one retrieve for each conf, each one with
a different pattern. So your first solution should be ok, except that you do
not get your transitive dependencies. But it seems it's more a problem of
configuration mapping than a problem with retrieve. Why did you change your
conf mapping from prj->lib to prj->default? The  first one seemed better
(even though it's difficult to say, we are missing the configuration
definition file, and maybe some dependencies declaration).

Xavier

Thx, I hope my poor english is understandable.
>
> Julien.
>
>
>
>
>
>
>
>
> ________________________________________________________________________________________
> Les informations ou pieces jointes contenues dans ce message sont etablies
> a l'intention exclusive de ses destinataires.
> Le CIBAMA decline toute responsabilite au titre de ce message s'il a ete
> modifie ou falsifie.
> Si vous n'etes pas destinataire de ce message, merci de le detruire et
> d'en avertir l'expediteur.
>
> Ce message a ete analyse par l'antivirus F-Secure.
>
> ________________________________________________________________________________________




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/



________________________________________________________________________________________
Les informations ou pièces jointes contenues dans ce message sont établies à l'intention
exclusive de ses destinataires.
Le CIBAMA décline toute responsabilité au titre de ce message s'il a été modifié ou falsifié.
Si vous n'êtes pas destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.

Ce message a été analysé par l'antivirus F-Secure.
________________________________________________________________________________________

Mime
View raw message