[ https://issues.apache.org/jira/browse/MJAVADOC-646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195280#comment-17195280 ]
Benjamin Marwell commented on MJAVADOC-646: ------------------------------------------- Related: https://issues.apache.org/jira/browse/MJAVADOC-650 I (personally) do not think this case is useful, as you would usually have a JDK installation anyway, and the fix from MJAVADOC-650 would fix finding the javadoc binary in this case as well. > Look for javadoc binary in the PATH as well > ------------------------------------------- > > Key: MJAVADOC-646 > URL: https://issues.apache.org/jira/browse/MJAVADOC-646 > Project: Maven Javadoc Plugin > Issue Type: Improvement > Components: javadoc > Affects Versions: 3.2.0 > Reporter: Antonin Delpeuch > Priority: Minor > > Currently, the maven-javadoc-plugin tries to locate the javadoc binary as > follows: > * either the path to the javadoc executable has been set by the user in the > configuration; > * or we look for it in the directory designated by the `java.home` system > property > * or we look for it in the directory designated by the `JAVA_HOME` > environment variable > If none of these work, we fail with the message "Unable to find javadoc > command". > In some environments, such as on Debian Sid with OpenJDK 12, the JAVA_HOME > property is not used by default and the javadoc binary is actually located in > the PATH, at `/usr/bin/javadoc`. This is a problem: as a user, my options are > to manually symlink that javadoc into the installation folder of the JDK (not > great) or write down the `/usr/bin/javadoc` path in the plugin's > configuration (which is going to lead to failures in other environments). > This problem seems to be fairly common: > [https://stackoverflow.com/questions/13961615/unable-to-find-javadoc-command-maven] > [https://stackoverflow.com/questions/49472783/maven-is-unable-to-find-javadoc-command] > [https://mail-archives.apache.org/mod_mbox/maven-dev/202003.mbox/browser] > Therefore I propose to adapt to look for the javadoc binary in the PATH as a > last resort attempt, before failing. > I can do a pull request for this if given the assurance that this is > something you would be happy to have. -- This message was sent by Atlassian Jira (v8.3.4#803005)