Skip to content

Check JAVA_HOME before java.home to locate JDK home #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 16, 2018

Conversation

klaren
Copy link
Contributor

@klaren klaren commented Jan 12, 2018

System.getProperty("java.home") return the path to the JDK and cannot be override.
JAVA_HOME should be checked before this to allow users to actually affect the path sent to the zinc server, other than using the toolchain plugin.

This fixes issue #221.

@davidB
Copy link
Owner

davidB commented Jan 16, 2018

System.getProperty("java.home") is the path of the currently running jvm, always set.
The env variable JAVA_HOME is not a reliable solution, because it could be not set, or point to JRE.

Sorry I mis-read your PR. It's fine

@davidB davidB merged commit 1073df6 into davidB:master Jan 16, 2018
@klaren
Copy link
Contributor Author

klaren commented Jan 16, 2018

And sorry I miss-spelled JRE with JDK. "java.home" will return the JRE and make the zinc compiler fail to find javac.

@davidB
Copy link
Owner

davidB commented Jan 16, 2018

np, Thanks.

@klaren klaren mentioned this pull request Feb 9, 2018
cdc6d added a commit to cdc6d/geomesa that referenced this pull request Dec 6, 2018
…ot POM.

This version of the plugin requires at least Maven 3.3.9.
Update README.md accordingly.  Delete the incomplete building
instructions in CONTRIBUTING.md and refer to README.md instead.

Since version 3.3.1, the scala-maven-plugin's way of invoking
Zinc changed so that Zinc may look in the wrong path for the
"javac" command.  Since version 3.3.2, this problem can be
defeated by setting the JAVA_HOME environment variable:

davidB/scala-maven-plugin#227

Add a note about this to the README because it caused me trouble.
cdc6d added a commit to cdc6d/geomesa that referenced this pull request Dec 6, 2018
…ot POM.

This version of the plugin requires at least Maven 3.3.9.
Update README.md accordingly.  Delete the incomplete building
instructions in CONTRIBUTING.md and refer to README.md instead.

Since version 3.3.1, the scala-maven-plugin's way of invoking
Zinc changed so that Zinc may look in the wrong path for the
"javac" command.  Since version 3.3.2, this problem can be
defeated by setting the JAVA_HOME environment variable:

davidB/scala-maven-plugin#227

Add a note about this to the README because it caused me trouble.

No significant diffs in the console output of a full build.

Signed-off-by: Carsten Clark <github-cdc@ccri.com>
jnh5y pushed a commit to locationtech/geomesa that referenced this pull request Dec 12, 2018
* GEOMESA-2478 Update git-commit-id-plugin to latest version.

Upgrade git-commit-id-plugin from 2.2.1 to the latest version,
2.2.5, in the root POM.

The previous versions of the plugin were hanging for me
when trying to build.  Upgrading fixed that issue for me.
This might have to do with the following bug:

git-commit-id/git-commit-id-maven-plugin#336

Note: the version in the root POM was last updated from 2.1.13 to
2.2.1 in May 2017.

In 3 other POMs, remove git-commit-id-plugin <version> which was set
to 2.1.13 (perhaps originally copied from the root POM):

 * geomesa-accumulo-tools/pom.xml,
   geomesa-lambda-tools/pom.xml: version 2.1.13 was selected
   in the initial commits of these POMs in Sep 2016 and July 2017.
   The latter may have been copy-pasted from the former.

 * geomesa-fs-tools/pom.xml: version 2.1.13 was selected in the
   git-commit-id-plugin configuration when it was added to this
   build in Sep 2017... perhaps copy-paste from one of the above
   two POMs.

Signed-off-by: Carsten Clark <github-cdc@ccri.com>

* GEOMESA-2478 Update all core Maven plugins to their latest versions.

Update all maven-*-plugin entries in the root POM's pluginManagement
to the latest version for each plugin.  Latest version info obtained
from https://maven.apache.org/plugins/ which turned out to match
what was available in Maven Central at
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/

Add a comment to each maven-*-plugin configuration saying when
the version was released, to make it easier to spot potentially
out-of-date plugins.

Upgrading the maven-compiler-plugin required turning off its
new 'useIncrementalCompilation' option in order to keep it from
recompiling Java files that the scala-maven-plugin already compiled.

I see no significant differences in the output of "build/mvn install"
before and after this change (other than the plugin version numbers).

Signed-off-by: Carsten Clark <github-cdc@ccri.com>

* GEOMESA-2478 Add pluginManagement entries for 3 missing core Maven plugins.

Again no significant diffs in the console output of a full build.

Signed-off-by: Carsten Clark <github-cdc@ccri.com>

* GEOMESA-2478 Bump license-maven-plugin from 2.10 to 3.10 in root POM.

3.0 was released 2016-08-20 and is the latest as of 2018-11-30.

Again no significant diffs in the console output of a full build.

Signed-off-by: Carsten Clark <github-cdc@ccri.com>

* GEOMESA-2478 Upgrade scala-maven-plugin from 3.2.1 to 3.4.4 in the root POM.

This version of the plugin requires at least Maven 3.3.9.
Update README.md accordingly.  Delete the incomplete building
instructions in CONTRIBUTING.md and refer to README.md instead.

Since version 3.3.1, the scala-maven-plugin's way of invoking
Zinc changed so that Zinc may look in the wrong path for the
"javac" command.  Since version 3.3.2, this problem can be
defeated by setting the JAVA_HOME environment variable:

davidB/scala-maven-plugin#227

Add a note about this to the README because it caused me trouble.

No significant diffs in the console output of a full build.

Signed-off-by: Carsten Clark <github-cdc@ccri.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants