[ 
https://issues.apache.org/jira/browse/MNG-5760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17143795#comment-17143795
 ] 

Guy Brand commented on MNG-5760:
--------------------------------

This change introduces a [possible 
{{NullPointerException}}|https://github.com/apache/maven/pull/342/files#diff-27608ebc026789b242c47348ac37dabfR65]
 as the {{project}} retrieved 
[here|https://github.com/apache/maven/pull/342/files#diff-27608ebc026789b242c47348ac37dabfR84]
 (coming from 
[{{LifecycleExecutionException#getProject()}}|https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/lifecycle/LifecycleExecutionException.java#L74])
 can return {{null}}.

We face this error when executing our integration tests which execute {{mvn 
resources:resources}} without an existing project. With Maven {{3.6.3}} the 
following error is thrown: 
{code:java}
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.995 s
[INFO] Finished at: 2020-06-24T09:38:21+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-resources-plugin:3.1.0:resources (default-cli): 
Goal requires a project to execute but there is no POM in this directory 
(/foo). Please verify you invoked Maven from the correct directory. -> [Help 
1]{code}
Can this be fixed as part of that issue ? Shall I create another pull request 
or will you have a look at this [~mthmulders] ?

> Add `-r/--resume` to automatically resume from the last failure point
> ---------------------------------------------------------------------
>
>                 Key: MNG-5760
>                 URL: https://issues.apache.org/jira/browse/MNG-5760
>             Project: Maven
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 3.2.5
>            Reporter: Phillip Webb
>            Assignee: Robert Scholte
>            Priority: Trivial
>             Fix For: 3.7.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently when a multi-module build fails the {{mvn}} command line prints the 
> following error:
> {noformat}
> [ERROR] After correcting the problems, you can resume the build with the 
> command
> [ERROR]   mvn <goals> -rf :some-module-name
> {noformat}
> Since I almost always want to use this flag with the next build it would be 
> very useful if you could type {{mvn <goals> -rf}} and have the project name 
> inferred from the last failure rather than needing to copy/paste from the 
> terminal.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to