我在我的项目目录中运行了这个命令来构建和打包它:
mvn clean javadoc:jar package
我的JAVA_HOME
变量设置正确。显然:
$ 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
有谁知道为什么 mvn 仍然抱怨?
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]