aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes maven 2:  How do I pull a different web.xml file based on a profile? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "maven 2:  How do I pull a different web.xml file based on a profile?" Watch "maven 2:  How do I pull a different web.xml file based on a profile?" New topic
Author

maven 2: How do I pull a different web.xml file based on a profile?

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Maven 2.2 on Mac 10.5.6. I'm using profiles to configure my web application build, and have this ...



My question is, does anyone know how I can get the build to include the web.xml file I have specified in the ${web.xml.path} variable? I'm not able to find how to tell Maven where to pull the web.xml file from.

Thanks, - Dave
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

The easiest way to to it is to specify an alternate resource directory, put the model web.xml into that and specify that directory as the resource source in your profile.

The Maven docs are reasonably clear on stuff like that, although I don't think they specifically mentioned anything about it in the WAR plugin, just the general resource handling of profiles.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: maven 2: How do I pull a different web.xml file based on a profile?