Re: Maven javadoc plugin: look for javadoc binary in PATH?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Maven javadoc plugin: look for javadoc binary in PATH?

Both stack overflow answers are missing the solution I would choose: toolchain[1] 
This makes it possible to refer to a different JDKs compared to the runtime JDK used by Maven.
However, having /usr/bin/javadoc doesn't follow the expected folder structure, because toolchain will look for /bin/javadoc , but you should be able to fix that with symlink I guess


[1] []

On 23-3-2020 00:05:35, Antonin Delpeuch (lists) <[hidden email]> wrote:

tldr: I am wondering if it would make sense for the Javadoc plugin to
look for the javadoc binary on the $PATH as well.

Running the javadoc plugin on a Debian with OpenJDK 12 fails with the
error: "Unable to find javadoc command: The environment variable
JAVA_HOME is not correctly set."

As far as I can tell there is no javadoc binary anywhere in the OpenJDK
12 distribution packaged for Debian. But I do have a /usr/bin/javadoc.

So if the javadoc plugin looked for a javadoc binary in the PATH, it
would work out of the box on Debian with that JDK.

This seems to be an issue many people run into:

Should I do a pull request to also look for the binary in the PATH?

Best wishes,


To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]