You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jaxzin <Br...@espn3.com> on 2008/12/09 00:12:40 UTC

Reusing assembly descriptors aka. sharing them between projects

I've created a standard way for our projects to be bundled for deployment
using an assembly descriptor.  I'd like all our projects to use it unchanged
without having to copy it into each project.  Any suggestions?  

Off the top of my head the only viable idea I have is to deploy it in a zip
to the Maven repo and use dependency plugin to resolve and unpack before
assembly step.  Any caveats to that idea?
-- 
View this message in context: http://www.nabble.com/Reusing-assembly-descriptors-aka.-sharing-them-between-projects-tp20905611p20905611.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Reusing assembly descriptors aka. sharing them between projects

Posted by jaxzin <Br...@espn3.com>.
Excellent John!!  That's exactly what I was looking for.  I definitely need
to read through the Sonatype book completely.



John Stoneham wrote:
> 
>>> Off the top of my head the only viable idea I have is to deploy it in a
>>> zip
>>> to the Maven repo and use dependency plugin to resolve and unpack before
>>> assembly step.  Any caveats to that idea?
>>
>> None that I am aware of. This is the approach generally used for
>> sharing configurations for Checkstyle etc across projects, so I think
>> it makes sense to use in this case as well.
> 
> Make a standard JAR project, and put the descriptor in
> src/main/resources/assemblies. (The 'assemblies' bit is important.)
> Build.
> 
> Add that artifact as a plugin-level dependency of the assembly plugin
> for your project.
> 
> Now, you can use it as a descriptorRef, just like jar-with-dependencies.
> 
> http://books.sonatype.com/maven-book/reference/assemblies.html#d0e16265
> has step-by-step instructions.
> 
> - John
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Reusing-assembly-descriptors-aka.-sharing-them-between-projects-tp20905611p20918021.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Reusing assembly descriptors aka. sharing them between projects

Posted by John Stoneham <ly...@lyrically.net>.
>> Off the top of my head the only viable idea I have is to deploy it in a zip
>> to the Maven repo and use dependency plugin to resolve and unpack before
>> assembly step.  Any caveats to that idea?
>
> None that I am aware of. This is the approach generally used for
> sharing configurations for Checkstyle etc across projects, so I think
> it makes sense to use in this case as well.

Make a standard JAR project, and put the descriptor in
src/main/resources/assemblies. (The 'assemblies' bit is important.)
Build.

Add that artifact as a plugin-level dependency of the assembly plugin
for your project.

Now, you can use it as a descriptorRef, just like jar-with-dependencies.

http://books.sonatype.com/maven-book/reference/assemblies.html#d0e16265
has step-by-step instructions.

- John

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


Re: Reusing assembly descriptors aka. sharing them between projects

Posted by Wayne Fay <wa...@gmail.com>.
> Off the top of my head the only viable idea I have is to deploy it in a zip
> to the Maven repo and use dependency plugin to resolve and unpack before
> assembly step.  Any caveats to that idea?

None that I am aware of. This is the approach generally used for
sharing configurations for Checkstyle etc across projects, so I think
it makes sense to use in this case as well.

Wayne

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