You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raffaele <r....@prismasw.it> on 2008/11/03 09:11:51 UTC

Re: WAR plugin misunderstanding

Ok, perhaps I was not able to describe properly my issue, I try with other
words:

How could I do to achieve this:

My web app project has obviously the ...src\main\webapp\WEB-INF folder with
inside some xml file, for example web.xml, repository.xml and others...

I would like to manage some profiles different from the default, for example
a dev profile, a release profile and a test profile.
Each one of those profiles has its repository.xml file, and I would like
that when I run mvn package -P "one of those profiles" the correct
repository.xml file went to final packaged war.

I tried configuring war plugin in the way described in my previous post, but
it seems not working...I imagine my problem is quite common for all
develoepers...

Thanks again and best regards
Raffaele
-- 
View this message in context: http://www.nabble.com/WAR-plugin-misunderstanding-tp20268175p20298645.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: WAR plugin misunderstanding

Posted by Wayne Fay <wa...@gmail.com>.
> Each one of those profiles has its repository.xml file, and I would like
> that when I run mvn package -P "one of those profiles" the correct
> repository.xml file went to final packaged war.

Generally, you would do this with a single repository.xml file and use
filtering to set the environment-specific values in it. This is
detailed in "Better Builds with Maven" and other documentation online.

Alternatively you might include all the xml files and somehow pick the
proper one to load at runtime. This is considered a superior approach
as it does not result in environment-specific WAR files.

Wayne

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