You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Lamy <LA...@accor-hotels.com> on 2003/10/27 18:00:48 UTC

RE : I want to copy dependency jars to a /lib location...how?

http://maven.apache.org/reference/user-guide.html#Copying%20Dependency%2
0JARs

-----Message d'origine-----
De : Vincent Tence [mailto:Vincent.TENCE@gemplus.com] 
Envoyé : lundi 27 octobre 2003 17:59
À : Maven Users List
Objet : RE: I want to copy dependency jars to a /lib location...how?



Try something like this in your maven.xml file: 

  <goal name="your-goal"> 
    <mkdir dir="${basedir}/target/lib"/> 
    <j:forEach var="dep" items="${pom.dependencies}"> 
      <copy 
        todir="${basedir}/target/lib" 

file="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.artifact}"
/> 
    </j:forEach> 
  </goal> 

.. and tell me if it works ;-) 

- Vincent 

> -----Original Message----- 
> From: Kelly Sonderegger [mailto:ksondere@novell.com] 
> Sent: Monday, October 27, 2003 11:07 AM 
> To: users@maven.apache.org 
> Subject: I want to copy dependency jars to a /lib location...how? 
> 
> 
> I apologize as I've tried to find this in the archives but can't seem 
> too.  And maybe what I'm trying to accomplish should be done in a 
> different fashion. 
> 
> But basically I'm just trying to copy jars specified by my project 
> dependencies into a target/lib directory.  Obviously I could just 
> respecify the jars but it would seem like I could use the dependency 
> statement in the project.xml to do this. 
> 
> Many thanks for your help, 
> Kelly Sonderegger 
> 
> 
> 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org 
> For additional commands, e-mail: users-help@maven.apache.org 
> 
> 


--------------------------------------------------------------------- 
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org 
For additional commands, e-mail: users-help@maven.apache.org 



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 



RE: RE : I want to copy dependency jars to a /lib location...how?

Posted by Vincent Tencé <Vi...@gemplus.com>.
Much better. Thanks for the pointer.

> -----Original Message-----
> From: Olivier Lamy [mailto:LAMY_Olivier@accor-hotels.com]
> Sent: Monday, October 27, 2003 12:01 PM
> To: 'Maven Users List'
> Subject: RE : I want to copy dependency jars to a /lib location...how?
>
>
> http://maven.apache.org/reference/user-guide.html#Copying%20De
> pendency%2
> 0JARs
>
> -----Message d'origine-----
> De : Vincent Tence [mailto:Vincent.TENCE@gemplus.com]
> Envoyé : lundi 27 octobre 2003 17:59
> À : Maven Users List
> Objet : RE: I want to copy dependency jars to a /lib location...how?
>
>
>
> Try something like this in your maven.xml file:
>
>   <goal name="your-goal">
>     <mkdir dir="${basedir}/target/lib"/>
>     <j:forEach var="dep" items="${pom.dependencies}">
>       <copy
>         todir="${basedir}/target/lib"
>
> file="${maven.repo.local}/${dep.artifactDirectory}/jars/${dep.
> artifact}"
> />
>     </j:forEach>
>   </goal>
>
> .. and tell me if it works ;-)
>
> - Vincent
>
> > -----Original Message-----
> > From: Kelly Sonderegger [mailto:ksondere@novell.com]
> > Sent: Monday, October 27, 2003 11:07 AM
> > To: users@maven.apache.org
> > Subject: I want to copy dependency jars to a /lib location...how?
> >
> >
> > I apologize as I've tried to find this in the archives but
> can't seem
> > too.  And maybe what I'm trying to accomplish should be done in a
> > different fashion.
> >
> > But basically I'm just trying to copy jars specified by my project
> > dependencies into a target/lib directory.  Obviously I could just
> > respecify the jars but it would seem like I could use the
> dependency
> > statement in the project.xml to do this.
> >
> > Many thanks for your help,
> > Kelly Sonderegger
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> This e-mail, any attachments and the information contained
> therein ("this message") are confidential and intended solely
> for the use of the addressee(s). If you have received this
> message in error please send it back to the sender and delete
> it. Unauthorized publication, use, dissemination or
> disclosure of this message, either in whole or in part is
> strictly prohibited.
> **************************************************************
> ********
> Ce message électronique et tous les fichiers joints ainsi que
>  les informations contenues dans ce message ( ci après "le
> message" ), sont confidentiels et destinés exclusivement à
> l'usage de la  personne à laquelle ils sont adressés. Si vous
> avez reçu ce message par erreur, merci  de le renvoyer à son
> émetteur et de le détruire. Toutes diffusion, publication,
> totale ou partielle ou divulgation sous quelque forme que se
> soit non expressément autorisées de ce message, sont interdites.
> **************************************************************
> ********
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org