Jesse Glick created MNG-5338:
--------------------------------
Summary: Accept a directory with -f/--file
Key: MNG-5338
URL: https://jira.codehaus.org/browse/MNG-5338
Project: Maven 2 & 3
Issue Type: Improvement
Components: Command Line
Affects Versions: 3.0.4
Reporter: Jesse Glick
Priority: Minor
Attachments: MNG-dash-f-dir.diff
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:
{code:none}
$ 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)
{code}
(I made an analogous change for Ant 1.8.3 in revision 1204655.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira