[ http://jira.codehaus.org/browse/MNG-556?page=comments#action_42570 ] 

Corridor Software Developer commented on MNG-556:
-------------------------------------------------


Ran into this as well while developing a plugin, only it was caused by not 
having @requiresDependencyResolution in the class javadoc.

If the patch simply returns an empty Collection, it will quietly fail to return 
a proper classpath for plugin developers not familiar with this javadoc tag. So 
I recommend that, if the requiresDependencyResolution flag wasn't set properly, 
throw the DependencyResolutionRequiredException with a verbose message:

"Dependencies have not been resolved. If this is a plugin, verify that 
@requiresDependencyResolution is set in the mojo object. See the developer's 
documentation for more detail."

If it has been set and their are no artifacts, then an empty Collection would 
be appropriate.

> NPE in MavenProject class
> -------------------------
>
>          Key: MNG-556
>          URL: http://jira.codehaus.org/browse/MNG-556
>      Project: Maven 2
>         Type: Bug
>   Components: maven-project
>     Versions: 2.0-beta-1
>     Reporter: Vincent Siveton
>      Fix For: 2.0-beta-1
>  Attachments: mavenproject.patch
>
>
> A NPE could be thrown in some circumstances (ie by the javadoc plugin) in the 
> MavenProject class.
> getArtifacts() could be null.
> Lets see the patch.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to