Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-3268

Command line doesn't handle multiple -P correctly

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.7
    • 2.0.10, 2.1.0-M1
    • Command Line
    • None

    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

        1. MNG-3268-maven-core.patch
          3 kB
          Paul Gier

        Issue Links

          Activity

            People

              pgier Paul Gier
              henri Henri Tremblay
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: