简体   繁体   中英

maven site plugin cannot find my javadoc

This error is driving me crazy in eclipse indigo

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on project Cdss-camel: Error during page generation: Error rendering Maven report: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]

My JAVA_HOME is set to /Library/Java/Home where it should be (symbolic link to the java home directory); I have a class path variable JAVA_HOME pointing to that location as well. Running the site plugin from zsh works,

首先检查您的JAVA_HOME似乎是错误的,然后将maven-site-plugin的版本更新为3.1而不是3.0。

I faced to this same problem. And tried everything to add JAVA_HOME to both .bash_profile and /etc/launchd.conf I hope those two methods could help you, but at least it did not help me.

I just add a property in pom as

(key: javadocExecutable, value: "${java.home}/../bin/javadoc")

Thanks to Marcin.

http://mgorski.net/2013/dev/fail-to-execute-javadoc-plugin-on-mac-osx-java_home-issue

The problem with the solution suggested above can be fixed by making sure that the Eclipse project refers to a JDK and not a JRE. Then the property will be able to find the javadoc executable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM