You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Valentin Jacquemin <ja...@gmail.com> on 2009/09/16 11:49:58 UTC
One pom file generating 2 artifacts
Hi all,
Is it possible to use one pom file that generates 2 artifacts?
I have one pom taking care of creating an ejb artifact but I'd like to
produce also a jar library containing every interfaces declaration of my ejb
to be able to include it in my war file.... How can I do that?
Thanks in advance,
Valentin Jacquemin
Re: One pom file generating 2 artifacts
Posted by Alexander Vaysberg <wo...@vaisberg.de>.
Hi,
yes look in jar plugin: -
http://maven.apache.org/plugins/maven-jar-plugin/usage.html.
It is in "How to create an additional attached jar artifact from the
project".
Valentin Jacquemin schrieb:
> Hi all,
>
> Is it possible to use one pom file that generates 2 artifacts?
> I have one pom taking care of creating an ejb artifact but I'd like to
> produce also a jar library containing every interfaces declaration of my ejb
> to be able to include it in my war file.... How can I do that?
>
>
> Thanks in advance,
>
>
> Valentin Jacquemin
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: One pom file generating 2 artifacts
Posted by Aleksey Didik <di...@magenta-technology.ru>.
Hello,
maven-ejb-plugin has possibility to create client jar with all what you
need.
http://maven.apache.org/plugins/maven-ejb-plugin/examples/generating-ejb-client.html
If you want to create more then one artifact from one module, read about
maven-assembly-plugin
http://maven.apache.org/plugins/maven-assembly-plugin/index.html
Best regards,
Aleksey Didik
Valentin Jacquemin пишет:
> Hi all,
>
> Is it possible to use one pom file that generates 2 artifacts?
> I have one pom taking care of creating an ejb artifact but I'd like to
> produce also a jar library containing every interfaces declaration of my ejb
> to be able to include it in my war file.... How can I do that?
>
>
> Thanks in advance,
>
>
> Valentin Jacquemin
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: One pom file generating 2 artifacts
Posted by Anders Hammar <an...@hammar.net>.
You can use classifier for that. However, I very seldom recommend using one
project to produce several artifacts (other than sources and javadoc jars,
and such).
The main reason is that you still only have one pom. This means that you
will have the same dependencies for all artifacts, which screws up the
dependency "magic" of Maven. The user of your artifacts will not enjoy the
full beauty of it.
My advice, go with two projects. One projects is for the api and the other
is for the impl. The way, in my opinion, to modularize today.
/Anders
On Wed, Sep 16, 2009 at 11:49, Valentin Jacquemin <ja...@gmail.com>wrote:
> Hi all,
>
> Is it possible to use one pom file that generates 2 artifacts?
> I have one pom taking care of creating an ejb artifact but I'd like to
> produce also a jar library containing every interfaces declaration of my
> ejb
> to be able to include it in my war file.... How can I do that?
>
>
> Thanks in advance,
>
>
> Valentin Jacquemin
>