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

Accept a directory with -f/--file

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.4
    • 3.1.0-alpha-1
    • Command Line
    • None
    • Patch

    Description

      The overwhelming majority of Maven POMs are in fact named pom.xml. Yet if you want to build a project in another directory, you are forced to specify e.g. -f subdir/pom.xml where /pom.xml ought to be obvious.

      This simple patch lets you pass a directory to -f in which case the filename pom.xml is assumed. There should be no compatibility issue since 3.0.4 just rejects such paths with a silly error:

      $ mvn -f /src/maven3 install
      [INFO] Scanning for projects...
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]   
      [ERROR]   The project  (/src/maven3) has 1 error
      [ERROR]     Non-readable POM /src/maven3: /src/maven3 (Is a directory)
      

      (I made an analogous change for Ant 1.8.3 in revision 1204655.)

      Attachments

        1. MNG-dash-f-dir.diff
          2 kB
          Jesse N. Glick

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              jglick Jesse N. Glick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: