[
https://issues.apache.org/jira/browse/CXF-6712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Urban updated CXF-6712:
------------------------------
Description:
The cxf-java2wadl-plugin uses always the platform encoding
{code}
[warn] Source files encoding has not been set, using platform encoding Cp1252,
i.e. build is platform dependent!
{code}
which produces errors, if source has another encoding.
The used maven-javadoc-plugin has a parameter for encoding, it should be set in
cxf-java2wadl-plugin.
Something like:
{code}
@Parameter( property = "encoding", defaultValue =
"${project.build.sourceEncoding}" )
private String encoding;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
AbstractJavadocMojo mojo = new JavadocReport();
Locale locale = Locale.getDefault();
try {
Field f = AbstractJavadocMojo.class.getDeclaredField("encoding");
f.setAccessible(true);
f.set(mojo, encoding);
{code}
should do it.
was:
The cxf-java2wadl-plugin uses always the platform encoding, which produces
errors, if source has another encoding.
The used maven-javadoc-plugin has a parameter for encoding, it should be set in
cxf-java2wadl-plugin.
Something like:
{code}
@Parameter( property = "encoding", defaultValue =
"${project.build.sourceEncoding}" )
private String encoding;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
AbstractJavadocMojo mojo = new JavadocReport();
Locale locale = Locale.getDefault();
try {
Field f = AbstractJavadocMojo.class.getDeclaredField("encoding");
f.setAccessible(true);
f.set(mojo, encoding);
{code}
should do it.
> [cxf-java2wadl-plugin] Add parameter encoding to goal parsejavadoc
> ------------------------------------------------------------------
>
> Key: CXF-6712
> URL: https://issues.apache.org/jira/browse/CXF-6712
> Project: CXF
> Issue Type: Improvement
> Components: JAX-RS
> Affects Versions: 3.1.4
> Reporter: Daniel Urban
>
> The cxf-java2wadl-plugin uses always the platform encoding
> {code}
> [warn] Source files encoding has not been set, using platform encoding
> Cp1252, i.e. build is platform dependent!
> {code}
> which produces errors, if source has another encoding.
> The used maven-javadoc-plugin has a parameter for encoding, it should be set
> in cxf-java2wadl-plugin.
> Something like:
> {code}
> @Parameter( property = "encoding", defaultValue =
> "${project.build.sourceEncoding}" )
> private String encoding;
> @Override
> public void execute() throws MojoExecutionException, MojoFailureException {
> AbstractJavadocMojo mojo = new JavadocReport();
> Locale locale = Locale.getDefault();
> try {
> Field f = AbstractJavadocMojo.class.getDeclaredField("encoding");
> f.setAccessible(true);
> f.set(mojo, encoding);
> {code}
> should do it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)