maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "√Čric Daigneault" <dai...@gmail.com>
Subject Re: custom jar contents?
Date Mon, 01 Oct 2007 19:35:46 GMT
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 <nishant.sonar@wachovia.com> 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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message