custom jar contents?

2007-10-01 Thread Sonar, Nishant
Hi 

I have a structure as 

MyAppModule

Src

Main

Java

Com

Myapp

Bankapplication

Some classes

Utilities

FormulaCalc

someclasses

DateCalc

Someclasses

Pom.xml

 

I need top have 2 jars as utilitied and myappmodule. What can I do for
such a case where there's a single pom to generate 2 jars comprising
selective classes?

 

-Nishant



Re: custom jar contents?

2007-10-01 Thread Wayne Fay
Your email lost its formatting. Please post on pastebin or a similar
site and send the url as it is unclear what you are working with.

In general, if you want 2 jars, you should make 2 modules which means
2 poms and 2 directories. If one set of files depends on the other
(impl dep on api), then you should set dependencies between them etc
as needed.

Wayne

On 10/1/07, Sonar, Nishant [EMAIL PROTECTED] wrote:
 Hi

 I have a structure as

 MyAppModule

 Src

Main

Java

 Com

 Myapp

 Bankapplication

Some classes

 Utilities

FormulaCalc

someclasses

DateCalc

Someclasses

 Pom.xml



 I need top have 2 jars as utilitied and myappmodule. What can I do for
 such a case where there's a single pom to generate 2 jars comprising
 selective classes?



 -Nishant



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



Re: custom jar contents?

2007-10-01 Thread Éric Daigneault
Simple answer :

If you need two jars then your project needs to be broken into two separate
projects.

To get a better understanding I would like to know why you require to have
two jars ?  different configurations ? optional components ?

Believe me here I got through this a while ago on Maven and the best answer
I found was to rethink long and hard as to why I needed this done, and the
answer was that, in all things were made a lot simpler if I simple split the
project in two separate jars then have a top level project to generate the
actual package.  Sometimes this top level package does not contain code at
all, just POM and other declarations to determine the final packaging.

For this I use the assembly plugin (
http://maven.apache.org/plugins/maven-assembly-plugin/) and generate a zip
file with all needed for the software in a single archive.

This being said... if you absolutely neeed the extra jars and spliting the
code makes absolutely no sense the it is most probably possible to use the
assembly plugin to bend the one project one jar rule.

to summarize, at first I found Maven very frustrating to use until I found
out that rethinking the way a project should be laid-out and how it should
be built and packaged to follow Maven's philosophy it made things much more
simple in the long run.  After I changed to bend my habits to maven instead
of the opposite I discovered I was spending MUCH less time managing the
projects and packages and much more time actually coding and getting things
done.

On 10/1/07, Sonar, Nishant [EMAIL PROTECTED] wrote:

 Hi

 I have a structure as

 MyAppModule

 Src

 Main

 Java

 Com

 Myapp

 Bankapplication

 Some classes

 Utilities

 FormulaCalc

 someclasses

 DateCalc

 Someclasses

 Pom.xml



 I need top have 2 jars as utilitied and myappmodule. What can I do for
 such a case where there's a single pom to generate 2 jars comprising
 selective classes?



 -Nishant