Hi Baptiste, interesting points, I'd like to know more them too :P Have a nice weekend, Simo
http://people.apache.org/~simonetripodi/ On Sat, Feb 6, 2010 at 7:07 PM, Baptiste MATHUS <[email protected]> wrote: > Hi all, > > The answer given below makes me wonder once more what's the best practices, > i.e. which plugin the maven team recommends for each use case. > > Here's two assertions about shade and assembly, I'd be delighted that some > of the maven team members correct or confirm those. I feel it could clarify > things for maven users: > > - When maven-shade-plugin went out, I thought it was designed to be a > first-choice replacement for the maven-assembly-plugin/jar-with-dependencies > scenario/use case. > - Maven-assembly-plugin can do a lot more than just packaging an > uber-jar, that's why he remains useful. But when just wanting to package an > uber-jar, the recommended/maven way is using maven-shade-plugin. > > > Thanks in advance. > Cheers. > > 2010/2/6 Ron Wheeler <[email protected]> > >> Simone Tripodi wrote: >> >>> Hi all guys, >>> I've been developing a multi-module project where one module is the >>> 'commons' stuff and the other modules are dependent from the first >>> one; when producing artifacts, I want to include the 'commons' >>> dependency in the final jar, so I started using the shade plugin, and >>> declared the 'commons' dependency scope as 'provided', but sadly >>> noticed that dependencies which scope is 'provided' are not included >>> even if specified in the shade configuration. >>> Do you know if there is any other way/best practice that could help me, >>> please? >>> Thanks in advance, best regards! >>> Simo >>> >>> http://people.apache.org/~simonetripodi/<http://people.apache.org/%7Esimonetripodi/> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >>> >> >> I am not sure why you need shade but it sounds like jar-with-dependencies >> is for. >> http://maven.apache.org/plugins/maven-assembly-plugin/usage.html >> >> In your library, your dependencies are all declared as compile so that they >> get included into the library jar. >> >> In your client POMs, your shared library is declared as "provided" if you >> want to provide it separately >> or "compile" if you want it included in your >> client jar that is created with "jar-with-dependencies". >> >> >> I hope that this helps and does match what you are trying to achieve. >> >> Ron >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > Baptiste <Batmat> MATHUS - http://batmat.net > Sauvez un arbre, > Mangez un castor ! > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
