You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by dddzzz <dz...@gmail.com> on 2008/01/04 17:32:54 UTC

Deploying multi project as single war

Is it possible to deploy multi project as single war. Projects structure
looks similar to this:

rootProject (packaging POM)
-commonRootProject (packaging POM)
--commonCoreProject (packaging JAR - for now)
--...
-serverRootProject (packaging POM)
--serverCoreProject (packaging JAR - for now)
--...
-clientRootProject (packaging POM)
--clientCoreProject (packaging JAR - for now)
--...

How can I make a single WAR from this projects with maven2. web.xml is in
one of projects for now.
-- 
View this message in context: http://www.nabble.com/Deploying-multi-project-as-single-war-tp14619903s177p14619903.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Deploying multi project as single war

Posted by Nick Stolwijk <ni...@planet.nl>.
First thing, why do you want it to be in a single war, instead of a 
single war, with libraries inside? (Often, it is an eye opener to why 
you want something, instead of focusing on what you are trying to do)

Secondly, yes, it is possible, but not at all pretty or easy.  You have 
to work with the dependency:unpack-dependencies goal [1].

Hth,

Nick Stolwijk

[1] 
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html

dddzzz wrote:
> I want classes and resources from all projects to end up in single WAR. Is
> that possible with described project structure.
>
>   

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


Re: Deploying multi project as single war

Posted by dddzzz <dz...@gmail.com>.
I want classes and resources from all projects to end up in single WAR. Is
that possible with described project structure.

-- 
View this message in context: http://www.nabble.com/Deploying-multi-project-as-single-war-tp14619903s177p14620408.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Deploying multi project as single war

Posted by ni...@planet.nl.
If you want to make a war of one of the projects, make a packaging war of it. It will copy all dependencies as jars inside the WEB-INF/lib directory, effectively creating one WAR deployment for deployment to remote repositories or application servers (Which deploy do you mean?).

Also, copy your web.xml to the war project into src/main/webapp/WEB-INF to get it in the right place in the war file.

Is this what you are intending to do, or did I get the question wrong?

Hth,

Nick Stolwijk


-----Original Message-----
From: dddzzz [mailto:dzdddz@gmail.com]
Sent: Fri 1/4/2008 5:32 PM
To: users@maven.apache.org
Subject: Deploying multi project as single war
 

Is it possible to deploy multi project as single war. Projects structure
looks similar to this:

rootProject (packaging POM)
-commonRootProject (packaging POM)
--commonCoreProject (packaging JAR - for now)
--...
-serverRootProject (packaging POM)
--serverCoreProject (packaging JAR - for now)
--...
-clientRootProject (packaging POM)
--clientCoreProject (packaging JAR - for now)
--...

How can I make a single WAR from this projects with maven2. web.xml is in
one of projects for now.
-- 
View this message in context: http://www.nabble.com/Deploying-multi-project-as-single-war-tp14619903s177p14619903.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: Deploying multi project as single war

Posted by dddzzz <dz...@gmail.com>.

dddzzz wrote:
> 
> Is it possible to deploy multi project as single war. Projects structure
> looks similar to this:
> 
> rootProject (packaging POM)
> -commonRootProject (packaging POM)
> --commonCoreProject (packaging JAR - for now)
> --...
> -serverRootProject (packaging POM)
> --serverCoreProject (packaging JAR - for now)
> --...
> -clientRootProject (packaging POM)
> --clientCoreProject (packaging JAR - for now)
> --...
> 
> How can I make a single WAR from this projects with maven2. web.xml is in
> one of projects for now.
> 

I was thinking to use cargo-maven2-plugin but I dont want to merge multple
web.xml files since everthing I nead is in one I have.

-- 
View this message in context: http://www.nabble.com/Deploying-multi-project-as-single-war-tp14619903s177p14621256.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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