maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MINVOKER-41) NullPointerException in InvokerMojo::runBuild in case the mvn executable is not at the expected location
Date Tue, 01 Jul 2008 12:32:26 GMT

    [ http://jira.codehaus.org/browse/MINVOKER-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=140071#action_140071
] 

Benjamin Bentmann commented on MINVOKER-41:
-------------------------------------------

Yep, I see what you mean (Eclipse marks line 787 as a potential null pointer access). Seems
like we should add a {{return}} statement to the {{catch}} block to quit the method.

Can you describe in some more detail what makes the plugin fail to locate your Maven executable?
I.e. besides from the bad exception handling, is there something we could improve about the
way the executable is located?

> NullPointerException in InvokerMojo::runBuild in case the mvn executable is not at the
expected location
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MINVOKER-41
>                 URL: http://jira.codehaus.org/browse/MINVOKER-41
>             Project: Maven 2.x Invoker Plugin
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: $ mvn --version
> Maven version: 2.0.8
> Java version: 1.6.0_06
> OS name: "linux" version: "2.6.24-19-generic" arch: "i386" Family: "unix"
>            Reporter: Jeremy
>
> Assume that the mvn executable cannot be found at the expected location, then InvokerMojo::runBuild
throws a NullPointerException at line 787 (same line number in the trunk version). Indeed,
looking at InvokerMojo.java, if an exception is catched in the try clause line 777 (from the
invoker.execute method call), then "result" remains unaffected and the method call line 787
fails.
> I attach the InvokerMojo.java file as I get it from the svn repository, a "mvn -e -X
install > log" file and one of the POM that triggers the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message