Pregunta

Is there a way to set the character encoding of files generated by the maven hyperjaxb3-plugin? Out of the box, the Java files generated are encoded with ISO-8859-1 character set (at least on my Windows machine).

¿Fue útil?

Solución

This should work automatically in the next version (0.5.7, yet to be released).

Support for encoding was implemented in one of the last versions of XJC (2.2.5) and consequently in maven-jaxb2-plugin version 0.8.1. This functionality should be inheried by maven-hyperjaxb3-plugin in the next version.

Encoding can be configured in plugin configuration (encoding element). By default it is ${project.build.sourceEncoding}.

If you're not using Maven, just use the -encoding option of XJC.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top