daniel-frak / dummy4j

An extensible dummy/fake data generator library for Java
https://daniel-frak.github.io/dummy4j/
Apache License 2.0
11 stars 2 forks source link

Add JAVA_HOME location to maven-javadoc-plugin configuration. #16

Closed little-pinecone closed 4 years ago

little-pinecone commented 4 years ago

Solution from this StackOverflow question

Error for command

$ mvn verify sonar:sonar
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:jar (attach-javadoc) on project dummy4j: MavenReportException:
Error while generating Javadoc: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set.

For more information read the following articles: http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

My environment details:

$ javac --version
javac 11.0.8
$ mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.8, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
$ which java
/usr/bin/java
$ dirname $(dirname $(readlink -f $(which javac)))
/usr/lib/jvm/java-11-openjdk-amd64

Empty result for:

$ echo $JAVA_HOME
sonarcloud[bot] commented 4 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication