A mvn release:perform
is failing due to javadocs not being created. So I tried running
mvn javadoc:javadoc
myself and I see that it fails due to the javadoc comments in the source code not having definitions for all of the parameters and return values. Errors are of the format:
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:jar (attach-javadocs) on project my-project: MavenReportException: Error while generating Javadoc:
Exit code: 1 - /my/file.java:36: warning: no description for @return
This, however, used to work. So what changed?
I checked the maven-javadoc-plugin documentation and it now (in v3.0) says the parameter is not additionalParam, or additionalparam, but additionalOptions, and additionalJOptions. See maven-javadoc-plugin documentation.
When I searched for the parameter additionalParam, it does not appear. I'm confused how this could have worked. Searching for answers some people say to use what I'm using, others say to use additionalJOption. See Maven is not working in Java 8 when Javadoc tags are incomplete.
How can I fix it?
Any ideas on what caused the problem and how to fix it?
What I've tried
Luckily, I found a work around which was to disable the Javadoc linting from the command line:
mvn release:perform -Darugments="-Dmaven.javadoc.skip=true"
Kudo's to code.i-harness.com posting that gave me this work around.
So I'm passed the initial problem, but want/need to clean up the poms to remove useless parameters, or change them to the new/correct syntax (not yet tested).
Searches that were useful
Searching on SO gives these hits that were useful:
How can I disable the Maven Javadoc plugin from the command line? - Gave me the idea to search for maven.javadoc.skip which helped me find my work around.
Maven is not working in Java 8 when Javadoc tags are incomplete which says I should use
additionalJOption
parameter. The same question has an answer that says to use what I'm using<additionalparam>-Xdoclint:none</additionalparam>