maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason van Zyl <ja...@maven.org>
Subject Re: how generate additional artifacts from one project?
Date Tue, 23 Aug 2011 11:48:18 GMT
I wasn't sure whether the use case was for application level resources, or more build related
resources that wished to be attached. If it's application level resources intended to be shared
a separate project is appropriate, but if you're trying to gather build information, for example,
then making a small JAR in-situ and attaching it is the way to go.

On Aug 23, 2011, at 2:18 AM, Anders Hammar wrote:

> May I also add that try to stuff everything into one Maven project
> very often isn't the best solution. Why not split the shared resources
> into a separate module?
> Regarding the m-assembly-plugin, it's my understanding that it will
> attach the produced artifact by default ([1] and [2]). No need to use
> the build helper plugin for that.
> 
> /Anders
> 
> [1] http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#deploy
> [2] http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#attach
> 
> On Tue, Aug 23, 2011 at 02:19, Jason van Zyl <jason@maven.org> wrote:
>> 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.
>> 
>> 
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

Thanks,

Jason

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

A language that doesn’t affect the way you think about programming is not worth knowing.

 
 -— Alan Perlis




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message