Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.7
-
Component/s: Command Line
-
Labels:None
-
Number of attachments :
Description
It is currently not possible to have more than one -P on the same command line. Only the first specified profile is considered.
So if you do
mvn -Pmain -Ptest
only the main profile will be taken into account.
This may sound enough but it's not when your maven call is wrapped into a batch file. Let's say you have a batch doing the compilation of a given module:
a.bat
-------------------------------------
mvn install -Pmymodule %*
-------------------------------------
and you want to pass a special integration tests profile you would do:
a.bat -Pintegration-tests
But that won't work since you are not allowed to have two -P.
To merge them in DOS shell is quite a pain in the ***....
Attachments
Issue Links
| This issue relates to: | ||||
| MRELEASE-288 | The plugin should merge the profiles on a release:perform |
|
|
|
| This issue depends upon: | ||||
| MNG-3545 | Option -P-profile overridden if profile is activebyDefault |
|
|
|
Do you want to activate more than one profile ?
If yes, look at mvn -h and you can close the issue :
...
P,-activate-profiles Comma-delimited list of profiles to activate...
P,-activate-profiles Comma-delimited list of profiles to activate ...