While building project with maven following error occurs:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.7:jar (attach-javadocs) on project api: MavenReportException: Error while creating archive:Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
This happens, because JAVA_HOME points to JRE instead of JDK dir.
In my case it’s being set by the following command
and points to
Quick solution for this problem is adding the following inside properties tag :