[
https://jira.codehaus.org/browse/MINVOKER-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MINVOKER-118.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.8
Assignee: Robert Scholte
Fixed in [r1403115|http://svn.apache.org/viewvc?rev=1403115&view=rev]
> Specifying an unset property in <properties> causes a NullPointerException
> --------------------------------------------------------------------------
>
> Key: MINVOKER-118
> URL: https://jira.codehaus.org/browse/MINVOKER-118
> Project: Maven 2.x Invoker Plugin
> Issue Type: Bug
> Affects Versions: 1.6
> Environment: Maven 3.0.2
> Reporter: Derek Lewis
> Assignee: Robert Scholte
> Fix For: 1.8
>
> Attachments: maven-invoker-plugin-bug.zip
>
>
> When the invoker plugin is configured with a property as follows:
> {code:xml}
> <properties>
> <some.property>${example.property}</some.property>
> </properties>
> {code}
> If {{example.property}} is not set, the plugin throws a
> {{NullPointerException}}:
> {noformat}
> Caused by: java.lang.NullPointerException
> at java.util.Hashtable.put(Hashtable.java:394)
> at java.util.Hashtable.putAll(Hashtable.java:466)
> at
> org.apache.maven.plugin.invoker.AbstractInvokerMojo.getSystemProperties(AbstractInvokerMojo.java:1413)
> at
> org.apache.maven.plugin.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1307)
> at
> org.apache.maven.plugin.invoker.AbstractInvokerMojo.runBuild(AbstractInvokerMojo.java:1048)
> at
> org.apache.maven.plugin.invoker.AbstractInvokerMojo.runBuilds(AbstractInvokerMojo.java:974)
> at
> org.apache.maven.plugin.invoker.AbstractInvokerMojo.execute(AbstractInvokerMojo.java:626)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
> {noformat}
> I would expect it to either set {{some.property}} to "${example.property}" or
> an empty string.
> The attached testcase has two profiles, profile-with-value and
> profile-with-empty-value. With profile-with-value activated, mvn package
> passes. With profile-with-empty-value, or no profile activated, {{mvn
> package}} will fail with the {{NullPointerException}}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira