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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.4
    • 3.1.5, 3.0.8, 3.2.0
    • JAX-RS
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: