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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- Lee Meador Sent from gmail. My real email address is lee AT leemeador.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]