On 4/13/06, Brett Porter <[EMAIL PROTECTED]> wrote: > jerome lacoste wrote: > > There were 2 potential NPE reported in that issue. One was already > > fixed as a side effect to another bug fix. The other one, I want to be > > able to understand how it can happen (e.g. if the NPE is just caused > > by a user configuration/usage error, I won't push the proposed patch), > > so I need to understand why project.getArtifact() can return null. Can > > someone tell me when this can happen? > > the artifact should never be null (unless something tries to set it to > null explicity in a mojo). The main thing that comes up null is > getFile(), which is when the packaging mojo didn't set it.
Thanks for looking into this. OK then there's something wrong in at least 2 users setup. Will be hard for me to troubleshoot what their other mojos are doing. If null if not an accepted argument to MavenProject.setArtifact(), can we add a throw new NullPointerException() in that setter method to identify the issue? Or log a warning if it's an accepted but very uncommon case? Cheers, Jerome --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]