Pete_ch
Pete_ch

Reputation: 1321

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,

Upvotes: 1

Views: 4712

Answers (3)

gne
gne

Reputation: 1

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.

Upvotes: 0

Liang
Liang

Reputation: 371

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

Upvotes: 2

khmarbaise
khmarbaise

Reputation: 97527

First check you JAVA_HOME which seemed to be wrong furthermore update the version of the maven-site-plugin to 3.1 instead of 3.0.

Upvotes: 2

Related Questions