This is an automated email from the ASF dual-hosted git repository. dkulp pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cxf-xjc-utils.git
commit 689ca241576cc0680d6368041f2da7fee23fbb62 Author: Daniel Kulp <dk...@apache.org> AuthorDate: Mon Jun 11 15:17:04 2018 -0400 [CXF-7755] Add an encoding option to xjc, default to project encoding --- boolean-test/pom.xml | 3 +-- .../org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java | 10 +++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/boolean-test/pom.xml b/boolean-test/pom.xml index 6b9a003..cddfda1 100644 --- a/boolean-test/pom.xml +++ b/boolean-test/pom.xml @@ -30,8 +30,7 @@ <version>3.2.2-SNAPSHOT</version> </parent> - - <dependencies> + <dependencies> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> diff --git a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java index f772153..75b580b 100644 --- a/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java +++ b/cxf-xjc-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractXSDToJavaMojo.java @@ -92,6 +92,12 @@ public abstract class AbstractXSDToJavaMojo extends AbstractMojo { private boolean fork; /** + * + */ + @Parameter(defaultValue = "${project.build.sourceEncoding}") + private String encoding; + + /** * Sets the Java executable to use when fork parameter is <code>true</code>. */ @Parameter(defaultValue = "${java.home}/bin/java") @@ -421,7 +427,9 @@ public abstract class AbstractXSDToJavaMojo extends AbstractMojo { if (getLog().isDebugEnabled()) { list.add("-verbose"); } - + list.add("-encoding"); + list.add(encoding); + String[] xsdFiles = getXsdFiles(option.getXsdDir(), option.getXsd()); for (String xsdFile : xsdFiles) { list.add("-d"); -- To stop receiving notification emails like this one, please contact dk...@apache.org.