You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Reik Schatz <re...@bwin.org> on 2009/09/23 08:43:49 UTC

Removing dependency elements using profiles

Hi, I have the following scenario. I have a WAR type project which uses the
WAR overlay feature. The WAR overlay is added as dependency as described 
http://maven.apache.org/plugins/maven-war-plugin/overlays.html here . Now I
have the problem, that when building the WAR artefact for production, I
don't want this dependency to be included in the final WAR. How can I tell
Maven to exclude the dependency element for the overlay? The answer must be
using profiles but as far as I can see it, you can only add additional
dependencies using profiles but not exclude them.
-- 
View this message in context: http://www.nabble.com/Removing-dependency-elements-using-profiles-tp25530998p25530998.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: Removing dependency elements using profiles

Posted by Wayne Fay <wa...@gmail.com>.
> don't want this dependency to be included in the final WAR. How can I tell
> Maven to exclude the dependency element for the overlay? The answer must be

You can't remove dependencies via profiles, but you can adjust the
scope (eg to provided) which has the effect of removing it.

Wayne

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