Reputation: 2320
In my project, I am trying to skip javadoc plugin entirely when running mvn --batch-mode clean release:prepare
and mvn --batch-mode release:perform
. Yet, adding
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
does not prevent javadoc from being executed. I don't even ever mention javadoc in root pom.xml. Using maven option -Dmaven.javadoc.skip=true
or -Darguments="-Dmaven.javadoc.skip=true"
doesn't help either.
My pom.xml does not have parent poms. The version of maven-javadoc-plugin is displayed as 3.3.0.
The error I am trying to address is:
[INFO] java.lang.TypeNotPresentException: Type org.apache.maven.plugins.javadoc.JavadocJar not present
... the usual part of mess of a stack trace skipped ...
[INFO] Caused by: java.lang.UnsupportedClassVersionError: org/apache/maven/plugins/javadoc/JavadocJar : Unsupported major.minor version 52.0
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
I did not even define the <plugin>
part in the config to run javadoc. Interestingly, adding the following snipped still causes 3.3.0 javadoc to be ran!
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
</plugin>
What else can be attempted to disable the javadoc plugin from running entirely?
Upvotes: 1
Views: 445
Reputation: 75356
Note that you have this error:
Caused by: java.lang.UnsupportedClassVersionError: org/apache/maven/plugins/javadoc/JavadocJar : Unsupported major.minor version 52.0
[INFO] at java.lang.ClassLoader.defineClass1(Native Method)
which means that the version of Java you use to run Maven with is too old. See Unsupported major.minor version 52.0 for details.
Fix this so the javadoc plugin loads properly and then can recognize the system property you provide and not do anything further.
Upvotes: 1