You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by solo turn <so...@gmail.com> on 2005/06/07 18:55:57 UTC

[m2] transitive or module dependencies to create multiple jar libraries

is there any possibility (or if not, plan to allow) to include
multiple jars with stating just one dependency?

most of our projects depend on the same set of jars, but this may
change depending on the base version of the jars, and for ALL
projects.

what we try to avoid is editing these dependencies in all projects
(i.e. add or remove a jar, adjust the versions of all of it). we would
like to just increase the version of the one dependency.

-solo.

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


Re: [m2] transitive or module dependencies to create multiple jar libraries

Posted by Brett Porter <br...@apache.org>.
solo turn wrote:

>i tried to include all the jars which belong to plexus-components:
>
>myproject.pom contains:
>  <dependencies>
>  <dependency>
>  <groupId>plexus</groupId>
>  <artifactId>plexus-components</artifactId>
>  <version>1.0</version>
>  <scope>compile</scope>
>  </dependency>
>
>m2 tries to download a "plexus-components.jar". but it should
>download the plexus-components modules jars.

http://jira.codehaus.org/browse/MNG-313 already exists to implement this.

>
>i'm unsure how i would write the myproject.pom to do that, or how the
>"plexus-compontens.pom" should look like with the features you
>suggested to use.

You can declare a POM with dependencies on all the components, for example.

- Brett


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


Re: [m2] transitive or module dependencies to create multiple jar libraries

Posted by solo turn <so...@gmail.com>.
i tried to include all the jars which belong to plexus-components:

myproject.pom contains:
 <dependencies>
   <dependency>
     <groupId>plexus</groupId>
     <artifactId>plexus-components</artifactId>
     <version>1.0</version>
     <scope>compile</scope>
   </dependency>

m2 tries to download a "plexus-components.jar". but it should
download the plexus-components modules jars.

i'm unsure how i would write the myproject.pom to do that, or how the
"plexus-compontens.pom" should look like with the features you
suggested to use.

it is an abstraction which you have in idea (libraries), eclipse (user
libraries), websphere application server (shared libraries, where you
name one library containing multiple jars.

-solo

On 6/7/05, John Casey <jd...@commonjava.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Starting in maven2, we have two features you might be able to take
> advantage of:
> 
> 1. transitive dependency resolution
> 
>   This is the resolution of your dependencies' dependencies and so on
> until the full closure is calculated, and is automatic. To help reduce
> the bloat which is imminent in this type of system, we've also added
> dependency scopes (compile, runtime, test) which will resolve different
> sets depending on the specific application (whether you're currently
> running unit tests, bundling the app, etc.).
> 
> 2. <dependencyManagement/> POM section
> 
>   This new section is meant to be specified in a parent POM for your
> projects, and will help you to manage scope and version information for
> a set of standardized dependencies. In other words, if many - BUT NOT
> NECESSARILY ALL - of your projects use servletapi, you can specify an
> entry in <dependencyManagement/> in a common ancestor-POM which
> specifies the version '2.3' for servletapi. Then, when one of your
> projects references servletapi, it need only specify <groupId/> and
> <artifactId/> for that dependency, and the version will be retrieved
> from the <dependencyManagement/> section (NOTE: specifying the version
> locally will override the standards defined in the managed information).
> 
> Do these satisfy your requirements? You can find more information at
> http://maven.apache.org/maven2 (although that site is very much a work
> in progress)...
> 
> If this doesn't settle your specific issue, feel free to refine your
> question, and we'll do our best to address it.
> 
> HTH,
> 
> - -john
> 
> solo turn wrote:
> > is there any possibility (or if not, plan to allow) to include
> > multiple jars with stating just one dependency?
> >
> > most of our projects depend on the same set of jars, but this may
> > change depending on the base version of the jars, and for ALL
> > projects.
> >
> > what we try to avoid is editing these dependencies in all projects
> > (i.e. add or remove a jar, adjust the versions of all of it). we would
> > like to just increase the version of the one dependency.
> >
> > -solo.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> 
> iD8DBQFCpeh/K3h2CZwO/4URAi41AJ4yF9hWyDPihRIppEy87Qw9/EFtXQCgo5xM
> iEAQTx3jpb1zYFACxQw3TRQ=
> =X7r5
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
>

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


Re: [m2] transitive or module dependencies to create multiple jar libraries

Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Starting in maven2, we have two features you might be able to take
advantage of:

1. transitive dependency resolution

  This is the resolution of your dependencies' dependencies and so on
until the full closure is calculated, and is automatic. To help reduce
the bloat which is imminent in this type of system, we've also added
dependency scopes (compile, runtime, test) which will resolve different
sets depending on the specific application (whether you're currently
running unit tests, bundling the app, etc.).

2. <dependencyManagement/> POM section

  This new section is meant to be specified in a parent POM for your
projects, and will help you to manage scope and version information for
a set of standardized dependencies. In other words, if many - BUT NOT
NECESSARILY ALL - of your projects use servletapi, you can specify an
entry in <dependencyManagement/> in a common ancestor-POM which
specifies the version '2.3' for servletapi. Then, when one of your
projects references servletapi, it need only specify <groupId/> and
<artifactId/> for that dependency, and the version will be retrieved
from the <dependencyManagement/> section (NOTE: specifying the version
locally will override the standards defined in the managed information).

Do these satisfy your requirements? You can find more information at
http://maven.apache.org/maven2 (although that site is very much a work
in progress)...

If this doesn't settle your specific issue, feel free to refine your
question, and we'll do our best to address it.

HTH,

- -john

solo turn wrote:
> is there any possibility (or if not, plan to allow) to include
> multiple jars with stating just one dependency?
> 
> most of our projects depend on the same set of jars, but this may
> change depending on the base version of the jars, and for ALL
> projects.
> 
> what we try to avoid is editing these dependencies in all projects
> (i.e. add or remove a jar, adjust the versions of all of it). we would
> like to just increase the version of the one dependency.
> 
> -solo.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCpeh/K3h2CZwO/4URAi41AJ4yF9hWyDPihRIppEy87Qw9/EFtXQCgo5xM
iEAQTx3jpb1zYFACxQw3TRQ=
=X7r5
-----END PGP SIGNATURE-----

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