You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kurt Schrader <ks...@karmalab.org> on 2003/04/21 20:38:24 UTC

Re: FW: What does "war:war" always remove existing *.jar from ${maven .war.src}/WEB-INF/lib directory?

It sounds like you need to reorganize your project into 3 projects under
one "master" reactored project so that you can define your sub-projects as
dependencies of your other project.

-Kurt

On Mon, 21 Apr 2003, Alex Liu wrote:

> Hi,
>
> Why does "war:war" always remove existing *.jar from
> ${maven.war.src}/WEB-INF/lib?  I have setup a project has following
> structure:
>
> -- master-proj
>  |-- sub-proj-1
>  |-- sub-proj-2
>
> master-proj:
>     This project is used to build a war file which contains JARs generated
> by "sub-proj-1"
>     and "sub-proj-2".
> sub-proj-1:
>     This project is used to build a JAR file.
> sub-proj-2:
>     This project is used to build another JAR file.  This project depends on
> "sub-proj-1".
>
> I created a goal that does followng:
>     1.  call "clean" on "master-proj", "sub-proj-1", "sub-proj-2" (using
> reactor)
>     2.  call "java:compile,java:jar,jar:install" on "sub-proj-1" and
> "sub-proj-2" (using
>         reactor)
>     3.  manually copy the JAR files from "sub-proj-1/target" and
> "sub-proj-2/target" to
>         ${maven.war.src}/WEB-INF/lib.
>         Note:  the reason I have to do this manually is that I cannot define
> "sub-proj-1" and
>         "sub-proj-2" as "dependencies" in "master-proj" because both
> "sub-proj-1" and
>         "sub-proj-2" are child project of "master-proj".
>     4.  call "war:war" on "master-proj".
>
> Since "war:war" always remove any existing *.jar from ${maven.war.src}, all
> JAR files generated by "sub-proj-1" and "sub-proj-2" are not bundled in the
> final WAR file.  All JAR files that are defined as dependencies (with
> "war.bundle.jar" property sets to "true") are bundled in the final WAR file.
>
> My understanding is that we should be able to put whatever we need to
> ${maven.war.src}, and "war:war" should just package them into the WAR file.
>
> "war:webapp" seems to be doing the right thing.  It preserves all the
> existing JAR files in ${maven.war.src}/WEB-INF/lib.
>
> Did I set up my project right as above?  Or I have to alter "war:war"
> (comment out the part that removing existing JARs from
> ${maven.war.src}/WEB-INF/lib goal to solve the problem?
>
> Alex
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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