You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Shannon Hickey <sh...@adobe.com> on 2010/09/03 05:36:56 UTC
Combined JAR / ZIP project - ZIP shouldn't fetch dependencies
Hi!
I'm currently working on a packaging=jar project. In addition to the plain jar, by using the assembly plugin I also generate a jar-with-dependencies, and - using a custom assembly - a zip file (with the bin classifier). The zip file contains:
* the plain jar
* a batch file to run the jar
* a lib directory containing the jar's dependencies
The latter two parts of the artifact (the jar-with-dependencies and the zip) are both self-contained. They need nothing else to run them since all dependencies are packaged with them.
When another project includes this artifact as a dependency, however, by default it tries to pull in all of the dependencies of my project too. Of course, this makes sense if they're using the plain jar. But this doesn't make sense if all they want is to consume the jar-with-dependencies or the zip file. How do I fix this?
I'd like to configure it such that projects requiring just the zip/bin or jar-with-dependencies classifiers don't need to download all the dependencies. If that's not possible, another option I'd consider is NOT deploying the plain jar at all, and just deploying the jar-with-dependencies and bin, and configure it such that no-one using this artifact has to pull its dependencies.
Ideas?
Thanks,
--
Shannon Hickey
Adobe Systems Incorporated
Re: Combined JAR / ZIP project - ZIP shouldn't fetch dependencies
Posted by Stephen Connolly <st...@gmail.com>.
create the zip and the jar-with-dependencies in separate modules that pull
in the plain jar with scope=provided
On 3 September 2010 04:36, Shannon Hickey <sh...@adobe.com> wrote:
> Hi!
>
> I'm currently working on a packaging=jar project. In addition to the plain
> jar, by using the assembly plugin I also generate a jar-with-dependencies,
> and - using a custom assembly - a zip file (with the bin classifier). The
> zip file contains:
>
>
> * the plain jar
> * a batch file to run the jar
> * a lib directory containing the jar's dependencies
>
> The latter two parts of the artifact (the jar-with-dependencies and the
> zip) are both self-contained. They need nothing else to run them since all
> dependencies are packaged with them.
>
> When another project includes this artifact as a dependency, however, by
> default it tries to pull in all of the dependencies of my project too. Of
> course, this makes sense if they're using the plain jar. But this doesn't
> make sense if all they want is to consume the jar-with-dependencies or the
> zip file. How do I fix this?
>
> I'd like to configure it such that projects requiring just the zip/bin or
> jar-with-dependencies classifiers don't need to download all the
> dependencies. If that's not possible, another option I'd consider is NOT
> deploying the plain jar at all, and just deploying the jar-with-dependencies
> and bin, and configure it such that no-one using this artifact has to pull
> its dependencies.
>
> Ideas?
>
> Thanks,
> --
> Shannon Hickey
> Adobe Systems Incorporated
>