You probably can but you probably shouldn't.

This sounds like exactly the wrong reason to use profiles.

If you have 2 web.xmls, you probably are mixing deployment with development.

Either move all of the code to a new maven project that produces a jar that is a dependency to 2 projects that have web.xml files and not much else
or
move the stuff out of the web.xml and put it where it belongs in the environment using JNDI or some other way to communicate environment info to your code.

Maven has been used to build thousands of web apps so it is unlikely that you have come up with a new and novel way to do it. These is a standard way (sometimes several) to solve whatever it is that you want to do.

You need to describe what you are actually trying to accomplish before anyone can give you an answer about how.

In addition to responding to Wayne's direct question, you should provide some more background.


Ron


On 06/07/2012 3:40 PM, james2809 wrote:
Hi.

I'd like know, if using profiles, I can build a web project using different
web.xml files, in other words, one of the profile will use the web.xml 1,
and the other profile will use the web.xml 2.

Best Regards!

Thiago Siqueira

--
View this message in context: 
http://maven.40175.n5.nabble.com/Conditional-Build-tp5713228.html
Sent from the Maven - Users mailing list archive at Nabble.com.


--
Ron Wheeler
President
Artifact Software Inc
email: [email protected]
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to