RE: Two jars, one pom...

2007-11-16 Thread Brian E. Fox
The multi module is the correct way to go. You might be able to combine
them using the assembly plugin and the jar with dependencies stuff.

-Original Message-
From: Hirn, Joseph [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 13, 2007 11:48 PM
To: Maven Users List; [EMAIL PROTECTED]
Subject: Two jars, one pom... 

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]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two jars, one pom...

2007-11-15 Thread Antonio Petrelli
2007/11/13, Hirn, Joseph [EMAIL PROTECTED]:
 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.

Possibly the solution could be to separate these jars into atomic
modules (i.e. that they do not need to be separated anymore) and then
aggregating them in an all jar using the assembly plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/
This is in some way how Spring 2 is packaged: they provide modular
jars for Maven, but they also provide a spring-all jar containing
all the Spring.

Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Two jars, one pom...

2007-11-15 Thread Lee Meador
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]



Two jars, one pom...

2007-11-13 Thread Hirn, Joseph
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]