Philipp Nanz created CXFXJC-35:
----------------------------------
Summary: Maven-Plugin xsdtojava Task throws NullPointerException
if project.build.sourceEncoding is not set
Key: CXFXJC-35
URL: https://issues.apache.org/jira/browse/CXFXJC-35
Project: CXF XJC Utils
Issue Type: Bug
Components: Maven Plugin
Affects Versions: 3.3.0
Reporter: Philipp Nanz
If the Maven-Property {{project.build.sourceEncoding}} is not set, the plugin
execution fails with:
{quote}
[ERROR] Failed to execute goal org.apache.cxf:cxf-xjc-plugin:3.3.0:xsdtojava
(generate-sources) on project <project-name>: null: MojoExecutionException:
NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
{quote}
The error message was not really helpful in locating the problem. The reason is
that in this case an {{-encoding}} parameter is passed to XJC but without any
value.
Solution: The Encoding parameter should only be passed if the Maven property is
set.
Thanks in advance!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)