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

Option -pl ! foo should not fail if foo does not exist

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.9, 3.6.0
    • 4.0.0-alpha-2, 4.0.0
    • Command Line
    • None

    Description

      While I completely understand why Maven throws an error when -pl/--projects defines/contains a non-existing project, I don't really see why the negation of a non-existing project yields the same error, e.g.:

      c:\_dev\git\gitflow-incremental-builder>mvn -pl !foo
      [INFO] Scanning for projects...
      [ERROR] [ERROR] Could not find the selected project in the reactor: foo @
      [ERROR] Could not find the selected project in the reactor: foo -> [Help 1]
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException
      

      I'd say that at most this should be a warning, not an error.

      This change would come in handy to reuse scripts with certain default options (e.g. quickly build everything without tests, checkstyle, exclude moduleX, etc.) on different hierarchy levels of larger multi module project.

      Attachments

        Issue Links

          Activity

            People

              martinkanters Martin Kanters
              famod Falko Modler
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: