Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6712

[cxf-java2wadl-plugin] Add parameter encoding to goal parsejavadoc

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.4
    • Fix Version/s: 3.1.5, 3.0.8, 3.2.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The cxf-java2wadl-plugin uses always the platform encoding

      [warn] Source files encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
      

      which produces errors, if source has another encoding.

      The used maven-javadoc-plugin has a parameter for encoding, it should be set in ParseJavaDocMojo.

      Something like:

      @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);
      
      

      should do it.

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              dur dur
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: