mvn -Pstaging.profile,-development.profile jetty:run
This suppresses my active development.profile and activates my staging.profile
Friday, June 19, 2009
Suppress Maven Profiles Via Command Line
Say you have an active development.profile with, for example, database settings. To change this in versions of maven older than 2.10, you would have to change where you defined your active profiles. (settings.xml, pom.xml, or profiles.xml)
However, with maven 2.10 and onwards you can use the minus symbol ( - ) to suppress your active profiles on the command line.
This is handy if you want to, for example again, run jetty:run against a different environment.
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment