views:

41

answers:

1

I wrote a small maven plugin and everything seems to work well with prior version of maven (2.0.9) but my build fails on version 2.2.1 The stack trace does not show anything from my end of the code and was wondering if anyone has encountered this issue.

....
....
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:396)
    at java.util.Properties.setProperty(Properties.java:128)
    at org.apache.maven.project.ModelUtils.cloneProperties(ModelUtils.java:1264)
    at org.apache.maven.project.ModelUtils.cloneModelBaseFields(ModelUtils.java:318)
    at org.apache.maven.project.ModelUtils.cloneModel(ModelUtils.java:953)
    at org.apache.maven.project.DefaultMavenProjectBuilder.calculateConcreteStateInternal(DefaultMavenProjectBuilder.java:1855)
    at org.apache.maven.project.DefaultMavenProjectBuilder.calculateConcreteState(DefaultMavenProjectBuilder.java:1814)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.calculateConcreteState(DefaultLifecycleExecutor.java:779)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:575)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17 seconds
[INFO] Finished at: Thu May 27 16:18:40 CDT 2010
[INFO] Final Memory: 35M/63M
A: 

This looks similar to MNG-4382. Maybe the comments will help.

Pascal Thivent
Thank you Pascal, However I am not sure if that solution applies to my case. I have not touched any property object.
Dawit
@Dawit Actually, you are indirectly but since this is indirectly, this may be a real maven bug in your case. You should reopen or create an issue.
Pascal Thivent