If I understand well, you have a set of project modules that use some libraries, and in your build script, you want to retrieve both but with different pattern.
It's not the complete solution but I would suggest to place your prj artefact in a dedicated conf (in the <artefact> tag of the ivy.xml of DDDCommun and DDDService, you can say that your artefact are only in a dedicated conf.) Gilles > -----Original Message----- > From: GERARD JULIEN [mailto:[EMAIL PROTECTED] > Sent: lundi 22 octobre 2007 11:45 > To: [email protected] > Subject: RE: Custom retrieve pattern. > > > Have you read the configuration tutorial? > Yes, but ... > > > I think that's what is still not clear for you for the moment. > True, this a huge Nebula for me! > > I think my problem (except my conf understanding) is that in diademe ivy.xml > I have no dependencies > with lib conf... I expected in this case that ivy parse the dependencies and > retrieve transitive > dependencies with lib conf but not. > > So If I step back and explain what I want : > for the first task <ivy:retrieve useOrigin="true" > pattern="${ivy.application.dir}/[artifact].[ext]" > conf="prj" /> I expect the following files in the target directory : > - DDDCommun.jar > - DDDService.jar > > For the second task <ivy:retrieve useOrigin="true" > pattern="${ivy.application.dir}/[artifact]- > [revision].[ext]" conf="lib" /> I expect the following files in the target > directory : > - commons-lib-1.5.2.jar > But not the DDDCommun-v100.jar and DDDService-v100.jar that have already > retrieved by the first > task with the right format pattern for me! > > > > I give a try with this ivy.xml > > <?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> > > It's work fine except that the second task retrieve also the prj dependencies > with this format > DDDCommun-v100.jar and DDDService-v100.jar. It's quite a normal behaviour > with my conf but I would > like to not have this jars with this format... > There is a ivy way to achieve this goal? :) > > Thanx for the help > > Julien. > > -----Message d'origine----- > De : Xavier Hanin [mailto:[EMAIL PROTECTED] > Envoyé : vendredi 19 octobre 2007 19:23 > À : [email protected] > Objet : Re: Custom retrieve pattern. > > Could you step back and explain exactly which files you are expecting in > each directory after the retrieve? Because now with prj->lib it's normal you > have nothing in lib, since you map nothing in the lib conf of your Diademe > module. Have you read the configuration tutorial? It tries to explain what > exactly is the configuration mapping, I think that's what is still not clear > for you for the moment. > > Xavier > > On 10/19/07, GERARD JULIEN <[EMAIL PROTECTED]> wrote: > > > > 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:[EMAIL PROTECTED] > > Envoyé : mercredi 17 octobre 2007 20:22 > > À : [email protected] > > Objet : Re: Custom retrieve pattern. > > > > On 10/17/07, GERARD JULIEN <[EMAIL PROTECTED]> 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. > > > > ________________________________________________________________________________________ > > > > > > -- > 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. > ________________________________________________________________________________________
