Adding resources section to POM without directory element causes
NullPointerException
-------------------------------------------------------------------------------------
Key: MNG-1147
URL: http://jira.codehaus.org/browse/MNG-1147
Project: Maven 2
Type: Bug
Components: maven-resources-plugin
Versions: 2.0-beta-3
Reporter: David Jackman
Priority: Minor
Add a resources section to a POM without a directory element (in my case I did
have a filtering element, but that doesn't seem to matter). Do a build (at
least to the resources:resources goal). A NullPointerException is thrown:
java.lang.NullPointerException
at java.io.File.<init>(File.java:180)
at
org.apache.maven.plugin.resources.ResourcesMojo.copyResources(ResourcesMojo.java:104)
at
org.apache.maven.plugin.resources.ResourcesMojo.execute(ResourcesMojo.java:90)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:554)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:508)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:494)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:307)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:217)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:247)
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:324)
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)
Obviously, this is an error situation, but instead of throwing a runtime
exception, the resources plugin should report an error that a directory was not
provided.
--
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]