Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31036

maven jdk switch should also cover javadoc

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      maven-interation-plugin 2.12.1
      jenkins 1.625.1
    • Similar Issues:

      Description

      Solution of JENKINS-18403 implements a JDK switch for maven builds using a JDK1.6 or older. The javadocExecutable variable should also be set, to use the javadoc of the 'older' JDK. (https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#javadocExecutable)

      Since the strict parser rules with the newer javadoc versions this likely leads to build errors. (http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html)

      As a workaround, setting:

      <properties>
          ...
          <javadocExecutable>${JAVA_HOME}/bin/javadoc</javadocExecutable>
      </properties>
      

      in the pom helps. But again requires manual adjustment in every build.

        Attachments

          Issue Links

            Activity

            Hide
            aheritier Arnaud Héritier added a comment -

            I think that the best is too use maven toolchains. It is the best solution. Maybe we could improve its support in jenkins

            Show
            aheritier Arnaud Héritier added a comment - I think that the best is too use maven toolchains. It is the best solution. Maybe we could improve its support in jenkins
            Hide
            wilfredh Wilfred Hughes added a comment -

            It's also possible to work around this in the master, rather than making changes to every build.

            In http://jenkins.example.com/configure you can set 'Global MAVEN_OPTS' to '-Dadditionalparam=-Xdoclint:none'. This allows you to disable the strict javadoc and use the newer JDK/newer Jenkins with older Java projects.

            Show
            wilfredh Wilfred Hughes added a comment - It's also possible to work around this in the master, rather than making changes to every build. In http://jenkins.example.com/configure you can set 'Global MAVEN_OPTS' to '-Dadditionalparam=-Xdoclint:none'. This allows you to disable the strict javadoc and use the newer JDK/newer Jenkins with older Java projects.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              andreasmandel Andreas Mandel
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: