I ran this command in my project directory to build and package it:
mvn clean javadoc:jar package
I do have my JAVA_HOME
variable set correctly.
Evidently:
$ which java
/usr/bin/java
$ sudo ls -l /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Dec 18 23:42 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
$ which javadoc
/usr/bin/javadoc
Does anyone know why mvn still complains?
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:jar (default-cli) on project foo_bar: MavenReportException: Error while creating archive: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…