the war plugin is also capable of war overlaying. if you declare
another war as
   a dependency it will automatically unpack the war to your current
project. =)
   i'm not sure if this will fit in your current development build
structure but try
   to check it anyway.

  
http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html

pete marvin


Martin Gladdish wrote:
> I had the same problem the other day; trying to share JSPs and config
> files
> across multiple maven2 apps.
>
> I solved it by configuring the war plugin to pull in the resources
> from the
> shared folder, following instructions here:
> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
>
>
> A word of warning though: the <targetPath> functionality hasn't even been
> checked in to the head of the war plugin as yet - I had to apply a patch
> that was attached to the jira entry and use my own local patched build of
> the war plugin. See http://jira.codehaus.org/browse/MWAR-54 for further
> details.
>
> Hope this helps
>
> On 13/07/06, Bravo, Kris <[EMAIL PROTECTED]> wrote:
>>
>> Two options then.
>>
>> The less desirable is to build the common war, then unpack it into the
>> target directory of each webapps before packaging them up. You'll have
>> to watch this because the web.xml and other files are liable to get
>> trampled. See http://mojo.codehaus.org/dependency-maven-plugin/ and the
>> unpack'ing goals.
>>
>> The other is to create an ear project for each common/webapp pair and
>> share the session across both webapps within the ear. I'm gathering from
>> a quick google that this is a challenge - you are up for a challenge are
>> you? ;)
>>
>> kris bravo
>>
>>
>> -----Original Message-----
>> From: Srinivas Pavani [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, July 13, 2006 3:57 PM
>> To: users@maven.apache.org
>> Subject: RE: m2 multiple war files with some common code
>>
>>
>> Kris,
>>
>> Thanks for your reply.
>>
>> Most likely they will not be placed in the same ear file. Yes there are
>> common servlets and jsps that need to be shared across the apps.
>>
>> The question still remains how to integrate the servlets from common and
>> module specific directories into a single WAR file. I don't think just
>> listing it as a dependency would solve the problem, would it?
>> -- 
>> View this message in context:
>> http://www.nabble.com/m2-multiple-war-files-with-some-common-code-tf1939
>> 224.html#a5315554
>> Sent from the Maven - Users forum at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>>
>>
>


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

Reply via email to