You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by simoha <ko...@gmx.net> on 2008/09/08 14:38:00 UTC
Classpath!!!
I wish copied all POM dependencies in Classpath . can me someone please say,
how I can implement it in Java??
Thank you in advance
--
View this message in context: http://www.nabble.com/Classpath%21%21%21-tp19371140p19371140.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Classpath!!!
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Look at maven-dependency-plugin / copy-dependencies
-----Original Message-----
From: houzecl [mailto:christian-luc.houze@etat.ge.ch]
Sent: Monday, September 08, 2008 9:06 AM
To: users@maven.apache.org
Subject: Re: Classpath!!!
It depends on the Java class where you want to do that:
- if you want to do that inside a Maven Plugin code (because you might
be
coding a plugin), look at plugin doc: you get all necessary tools to get
the
dependencies, and manipulate a classpath.
- if you want to do that outside Maven plugin code (just giving a pom to
your class and requesting Maven for all associated dependencies) it's
not
easy. However you just may happy by triggering the generation of an
"effective pom" and parse it: then you get all the dependencies resolved
by
Maven.
Remember that when you have a pom, this pom is not alone: Maven needs to
get
all the associated context (e.g. settings, profiles, repositories used.
...)
to resolve the dependencies, and therefore getting a significant
classpath.
Therefore getting a classpath is better within Maven context (i.e.
within a
Maven plugin module)
Christian-luc
simoha wrote:
>
>
> I wish copied all POM dependencies in Classpath . can me someone
please
> say, how I can implement it in Java??
> Thank you in advance
>
--
View this message in context:
http://www.nabble.com/Classpath%21%21%21-tp19371140p19371593.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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
Re: Classpath!!!
Posted by houzecl <ch...@etat.ge.ch>.
It depends on the Java class where you want to do that:
- if you want to do that inside a Maven Plugin code (because you might be
coding a plugin), look at plugin doc: you get all necessary tools to get the
dependencies, and manipulate a classpath.
- if you want to do that outside Maven plugin code (just giving a pom to
your class and requesting Maven for all associated dependencies) it's not
easy. However you just may happy by triggering the generation of an
"effective pom" and parse it: then you get all the dependencies resolved by
Maven.
Remember that when you have a pom, this pom is not alone: Maven needs to get
all the associated context (e.g. settings, profiles, repositories used. ...)
to resolve the dependencies, and therefore getting a significant classpath.
Therefore getting a classpath is better within Maven context (i.e. within a
Maven plugin module)
Christian-luc
simoha wrote:
>
>
> I wish copied all POM dependencies in Classpath . can me someone please
> say, how I can implement it in Java??
> Thank you in advance
>
--
View this message in context: http://www.nabble.com/Classpath%21%21%21-tp19371140p19371593.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org