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

Ali Cheaito edited comment on MPH-143 at 3/20/18 3:24 PM:
----------------------------------------------------------

We're having this issue as well. I noticed that the problem goes away if the 
output param is omitted, which could explain why the issue was not found in 
testing.

Looking at the AbstractEffectiveMojo code (line 96 in 3.0.0), they use 
IOUtils.close(out) in the finally clause after nullifying out in the try 
clause. They probably meant to use closeQuietly which ignores accounts for null 
references. 


was (Author: cheaito):
We're having this issue as well. I noticed that the problem goes away if the 
output param is omitted.

> The maven-help-plugin generates null pointer for multi-module project
> ---------------------------------------------------------------------
>
>                 Key: MPH-143
>                 URL: https://issues.apache.org/jira/browse/MPH-143
>             Project: Maven Help Plugin
>          Issue Type: Bug
>          Components: effective-pom
>    Affects Versions: 3.0.0
>         Environment: windows and linux with maven 3.2.5
>            Reporter: Damien
>            Priority: Major
>
> The maven-help-plugin in version 3.0.0 generates a null pointer exception for 
> multi-module projects when the parameter "output" is set.
> The following command failed
> {{mvn help:effective-pom -Doutput=myoutput.xml}}
> with the error
> {{[INFO] BUILD FAILURE}}
> {{[INFO] 
> ------------------------------------------------------------------------}}
> {{[INFO] Total time: 2.187 s}}
> {{[INFO] Finished at: 2018-03-20T14:52:19+01:00}}
> {{[INFO] Final Memory: 24M/403M}}
> {{[INFO] 
> ------------------------------------------------------------------------}}
> {{[ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-help-plugin:3.0.0:effective-pom (default-cli) 
> on project OFRPDVC001: Execution default-cli of goal 
> org.apache.maven.plugins:maven-help-plugin:3.0.0:effective-pom failed. 
> NullPointerException -> [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/PluginExecutionException|https://www.google.com/url?q=http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException&sa=D&source=hangouts&ust=1521640353977000&usg=AFQjCNFFrjILs-lEz58QZue8xxeHq7gScQ]}}
> It doesn't happen with the previous versions, the following command helps to 
> prove it :
> {{mvn org.apache.maven.plugins:maven-help-plugin:2.2:effective-pom 
> -Doutput=myoutput.xml}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to