You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Lee Meador <le...@leemeador.com> on 2007/11/15 17:45:43 UTC

Re: Two jars, one pom...

We have a similar situation where we build a jar that goes into a rar
file but we need a client jar as well. We build one of the files with
an ant task (after maven has done all the compiling and such) and use
the build-helper plugin to add the extra resulting artifact file to
the list of things to install and deploy. Works like a charm.

It's similar to the situation where the ejb plugin generates an ejb
jar and a client jar too. The difference is that the ejb plugin adds
its own support for having two artifacts as a result.

-- Lee

On Nov 13, 2007 4:47 PM, Hirn, Joseph <Jo...@cmegroup.com> wrote:
> I am helping someone implement Maven in their project and looking for
> the best way to go about generating two jars from the same source base.
> They did this previously via two ant targets. Please note we are
> retrofitting this codebase to Maven so it was not originally structured
> with Maven's "project" structure in mind.
>
> The option to break up the project into two separate projects seems like
> the ideal way. They need an "ALL" jar and a client jar for distribution.
> From what was explained, it might need to be three components where
> there are server, client, and shared code. This would result in three
> POMS and three jars which does not simplify distribution as they would
> like a single "ALL" jar rather than having three separate artifacts.
>
> The other option would be to have a separate profile which compiles the
> client jar but that doesn't seem "mavenish", and I'm not 1000% sure it
> can be supported .
>
> If there is a third way I would appreciate the recommendation. I also
> would like to hear thoughts on my two approaches and if anyone has had
> to deal with separating out things in this manner.
>
> Thanks so much.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
-- Lee Meador
Sent from gmail. My real email address is lee AT leemeador.com

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