maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Venisse <emman...@venisse.net>
Subject Re: [m2] transitive or module dependencies to create multiple jar libraries
Date Fri, 03 Jun 2005 21:29:51 GMT
Hi,

solo turn wrote:
> hi,
> 
> how do you specify multiple jar files dependencies like it was done in
> plexus-components, which by itself has no jar, but modules? to bundle
> multiple jars so developers just have to state one dependency:
> 
> myproject.pom contains:
>   <dependencies>
>     <dependency>
>       <groupId>plexus</groupId>
>       <artifactId>plexus-components</artifactId>
>       <version>1.0</version>
>       <scope>compile</scope>
>     </dependency>
> 
> but m2 tries to download a "plexus-components.jar". but it should
> download the plexus-components modules jars.


It's a misunderstanding.
module is present in pom for facilitate the build. When you run a goal 
on a plugin that contains modules, all modules (sub-project) will be run 
with the same goal.

you can't depend on plexus-components because it isn't a jar but a pom.
Transitive dependencies are dependencies of a dependency, so if you 
depend on a jar like plexus-velocity, m2 downloads too velocity jar 
because velocity is a dependency of plexus-velocity.

Emmanuel

> 
> $ m2 compile
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building com.ubs.ocr:ocr:war:1.0-SNAPSHOT
> [INFO] ----------------------------------------------------------------------------
> [INFO] maven-war-plugin: resolved to version 2.0-alpha-2 from local repository
> [INFO] maven-resources-plugin: resolved to version 2.0-alpha-2 from
> local repository
> [INFO] maven-compiler-plugin: resolved to version 2.0-alpha-2 from
> local repository
> [INFO] [resources:resources]
> Downloading: http://repo1.maven.org/maven2/plexus/plexus-container-default/1.0-alpha-2/plexus-contain
> er-default-1.0-alpha-2.pom
> 0K downloaded
> Downloading: http://repo1.maven.org/maven2/plexus/plexus-container-default/1.0-alpha-2/plexus-contain
> er-default-1.0-alpha-2.pom.md5
> 0K downloaded
> Downloading: http://repo1.maven.org/maven2/plexus/plexus-components/1.0/plexus-components-1.0.jar
> [WARNING] Unable to get resource from repository http://repo1.maven.org/maven2
> [INFO] ----------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ----------------------------------------------------------------------------
> [INFO] Main Error:
>   Unable to download the artifact from any repository
>   plexus:plexus-components:1.0:jar
> 
> from the specified remote repositories:
>   http://repo1.maven.org/maven2
> 
> Root error:
>   Unable to download the artifact from any repository
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: 9 seconds
> [INFO] Finished at: Fri Jun 03 18:26:45 CEST 2005
> [INFO] Final Memory: 1M/2M
> [INFO] ----------------------------------------------------------------------------
> 
> 
> 
> -solo
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message