>My problem is that using the bundle jar or bundle test jar as a dependency in 
>another project >will pull in not only the bundle jar but all of the 
>individual jars that are part of the bundle jar.

Make the dependencies of the bundle project optional  ( ie
<optinal>true</optional>

-D



On Fri, Dec 5, 2008 at 4:12 PM, Brian Whipple <[EMAIL PROTECTED]> wrote:
> I have a multi-module project parent project that contains multiple child 
> projects.  I want to distribute a single jar that is a bundle or aggregation 
> of all the child project Java classes.  In addition, I want to distribute a 
> test jar that is a bundle or aggregation of all the child project test Java 
> classes.
>
> I have used Maven: The Definitive Guide Chapter 12 Maven Assemblies - Best 
> Practices as a template and have created two custom assembly descriptors and 
> two child "bundle" projects.  One bundles all the peer projects with Java 
> classes as dependencies and the other all the peer projects with test Java 
> classes as dependencies.
>
> So now my maven release releases all the child projects and the two bundle 
> projects that contain correctly assembled jars.
>
> My problem is that using the bundle jar or bundle test jar as a dependency in 
> another project will pull in not only the bundle jar but all of the 
> individual jars that are part of the bundle jar.
>
> I need to remove the individual child projects as dependencies for the 
> deployed bundle artifact.
>
> What is the best way to accomplish this?
>
> To re-word the question: if I want to create a single library (jar) from a 
> multi-module maven project how can I prevent the child modules from being 
> duplicated dependencies of the bundle library?
>
> Chapter 12 seems to show an example of this scenario under "Distribution 
> (Aggregating) Assemblies".  In that example, how can you distribute the 
> "app-distribution" project without pulling in the bundled artifacts 
> (app-core, app-web, app-addons) as separate individual artifacts?
>
> Thanks in advance for any help.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to