Quantcast

One pom file generating 2 artifacts

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

One pom file generating 2 artifacts

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: One pom file generating 2 artifacts

Aleksey Didik
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: One pom file generating 2 artifacts

Anders Hammar
In reply to this post by Valentin Jacquemin
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 <[hidden email]>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
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: One pom file generating 2 artifacts

Alexander Vaysberg
In reply to this post by Valentin Jacquemin
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: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...