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

Jenkins is passing Javadoc parameters to Java after parsing the poms

XMLWordPrintable

      I am running Jenkins 1.644 on Red Hat Enterprise Linux 6.6

      When trying to perform a Maven Release build of my projects I am encountering the following error:

      [release] $ /usr/java/jdk1.8/bin/java -Xdoclint:none -cp /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/usr/lib/apache-maven/boot/plexus-classworlds-2.5.1.jar:/usr/lib/apache-maven/conf/logging jenkins.maven3.agent.Maven31Main /usr/lib/apache-maven /opt/dmct/jenkins/data/war/WEB-INF/lib/remoting-2.53.2.jar /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 40041
      Unrecognized option: -Xdoclint:none
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      It seems to be passing the doclint argument to Java instead of Javadoc. The same Maven configuration seems to work fine for normal snapshot builds, and I have no problem running a dry run release locally.

      I am running Java 8 and have the doclint disable switch in my parent pom:
      <profile>
      <id>doclint-java8-disable</id>
      <activation>
      <jdk>[1.8,)</jdk>
      </activation>
      <properties>
      <javadoc.opts>-Xdoclint:none</javadoc.opts>
      </properties>
      </profile>
      Combined with:
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <version>2.10.1</version>
      <configuration>
      <additionalparam>${javadoc.opts}</additionalparam>

      Jenkins seems to parse the POMs and then pass the doclint argument to Java instead of Javadoc. However, the same problem does not occur when I run the snapshot build with identical Maven configuration:

      Parsing POMs
      Discovered a new module com.lloydsbanking.im.ods:ods-common ods-common
      Modules changed, recalculating dependency graph
      [snapshot] $ java -XX:MaxPermSize=512m -cp /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/usr/lib/apache-maven/boot/plexus-classworlds-2.5.1.jar:/usr/lib/apache-maven/conf/logging jenkins.maven3.agent.Maven31Main /usr/lib/apache-maven /opt/dmct/jenkins/data/war/WEB-INF/lib/remoting-2.53.2.jar /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /opt/dmct/jenkins/data/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 46220
      Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Executing Maven: -B -f /opt/dmct/jenkins/data/workspace/ods-common/snapshot/pom.xml clean -U verify javadoc:jar source:jar
      [INFO] Scanning for projects...

      I have also installed the workspace clean up plugin to see if that helped, but still get the same error. Full build log attached.

      Jenkins seems to be pulling the doclint argument out of the parent pom and passing it as an argument to Java instead of Javadoc.

            Unassigned Unassigned
            ben_lbg Ben Abramson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: