You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2018/06/24 19:53:00 UTC
[jira] [Closed] (MNG-6279) -pl at *end* of command line
should raise a warning
[ https://issues.apache.org/jira/browse/MNG-6279?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-6279.
-------------------------------
Resolution: Incomplete
No reaction for six month.
> -pl <module> at *end* of command line should raise a warning
> ------------------------------------------------------------
>
> Key: MNG-6279
> URL: https://issues.apache.org/jira/browse/MNG-6279
> Project: Maven
> Issue Type: Bug
> Components: Command Line
> Affects Versions: 3.0.5
> Environment: Ubuntu 14.04.3 LTS
> Reporter: Chris Hennick
> Priority: Major
>
> I recently tried to run tests on only one specific module using this shell script:
> {code:sh}
> #!/bin/sh
> mvn jacoco:prepare-agent -pl betterrandom &&\
> mvn test -pl betterrandom &&\
> mvn jacoco:report -pl betterrandom &&\
> if [ "$TRAVIS" = "true" ]; then
> mvn coveralls:report -pl betterrandom
> fi
> {code}
> It took me a long time to find out that the -pl <module> option needed to come *before* the goals it was to apply to. Since -pl <module> with no goals after it can't have any effect, it's almost certainly a sign that the command-line parameters are out of order. And since this is such an easy mistake to make when one's new to multi-module Maven projects, the invocation should raise a warning along the lines of "-pl <module> in this position has no effect. To filter a goal to a specific module, it must come *before* that goal on the command line. Did you mean mvn -pl <module> <goal...>?"
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)