You can use the build helper plugin[1] to attach arbitrary artifacts. So you 
can use any means to produce the artifact you want to attach, say the assembly 
plugin, and then use the attach-artifact goal[2] of the build helper plugin to 
have it be installed in your local repository and deployed to the remote 
repository. Alternatively you can roll your own solution, something like 
this[3]. The full example is here[4].

[1]: http://mojo.codehaus.org/build-helper-maven-plugin/
[2]: 
http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo.html
[3]: 
https://github.com/jvanzyl/maven-recipes/blob/master/attached-artifact/src/main/java/io/jvz/maven/MojoThatAttachesAnAdditionalArtifact.java
[4]: https://github.com/jvanzyl/maven-recipes/tree/master/attached-artifact

On Aug 22, 2011, at 6:13 PM, Sam Jiang wrote:

> Hi all
> 
> I'm trying to generate additional artifact flavours for a single project. I
> checkout the assembly plugin but I'm still not quite sure where to start.
> Some help is really appreciated.
> 
> right now I have
> artifact-sources.jar and
> artifact-javavdoc.jar.
> 
> I would like to generate one more something like -resources.jar, which
> contains public resources to be shared by my build tool. Is the assembly
> plugin the right place to start? after I generate this flavour, how do I
> tell maven to deploy / install it along others?
> 
> thanks
> 
> -- 
> Sam Jiang | karoshealth
> (っ゚Д゚;)っ hidden cat here
> 7 Father David Bauer Drive, Suite 201
> Waterloo, ON, N2L 0A2, Canada
> www.karoshealth.com

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
---------------------------------------------------------

To do two things at once is to do neither.
 
 -—Publilius Syrus, Roman slave, first century B.C.



Reply via email to