phyloref / jphyloref

MIT License
0 stars 0 forks source link

Need to set JAVA_HOME to build jphyloref #81

Closed iimog closed 3 years ago

iimog commented 3 years ago

Hi there :wave: I'm Markus, I'm doing one of the reviews for JOSS. I'll open issues here as I go through the checklist at https://github.com/openjournals/joss-reviews/issues/3374

When trying to build jphyloref using mvn package on my machine (Ubuntu 20.04, openjdk 11.0.11) I get the following error:

<lots of lines with INFO and WARNING>
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  22.897 s
[INFO] Finished at: 2021-06-17T14:40:02+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project jphyloref: MavenReportException: Error while generating Javadoc: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Full log: package.2.log

Infact, the error message The environment variable JAVA_HOME is not correctly set. was helpful in finding a solution. Simply running:

JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 mvn package

worked for me. This might be worth mentioning in the installation instructions in the README.

gaurav commented 3 years ago

Hi Markus -- thank you so much for your review and suggestions! I've added a note describing what the JAVA_HOME variable needs to be set to in PR #84 -- it's hard to provide instructions for how to do this across all the operating systems, but hopefully this should be enough to clue users in to what might be going wrong and what might fix it. What do you think?

iimog commented 3 years ago

That's perfect, thanks. You definitely can't provide instructions for every platform/OS/version. So having instructions for the main supported ones is fine. I suspect (although I'm biased) that Ubuntu is a rather common choice for users of jphyloref. Thanks for adding this note to the README.