Adding a special '$JAVA_HOME' symbol for use in jvm platforms args.

Review Request #3924 - Created May 23, 2016 and submitted

Information
Garrett Malmquist
pants
gmalmquist/java-home-symbol-for-bootclasspath
3490
Reviewers
pants-reviews
benjyw, jsirois, nhoward_tw, zundel
This addresses a long-standing TODO in pants.ini:

    # TODO(gmalmquist): Find a way to resolve the -Xbootclasspath
    # automatically, either by putting rt.jars up on the nexus or
    # using some kind of special variable name (see discussion on
    # RB 2494).

Now, at compile-time, the args from the jvm platform settings will
be pre-processed to replace all instances of `$JAVA_HOME` with the
java home determined by the platform's preferred jvm distribution.

The code will attempt to look up the distribution strictly, but if
that fails it will fallback on a non-strict lookup. "Strict" here
means a version X such that

    target_level <= X <= target_level.9999

Whereas unstrict is simply:

    target_level <= X

Manual testing + added a test to tests/python/pants_test/backend/jvm/tasks/jvm_compile/java/jvm_platform_integration_mixin.py.

Travis went green: https://travis-ci.org/pantsbuild/pants/builds/132398495
Jenkins went green: http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3490/1/

Travis went green again: https://travis-ci.org/pantsbuild/pants/builds/132867977

Issues

  • 0
  • 3
  • 0
  • 3
Description From Last Updated
Eric Ayers
Garrett Malmquist
Eric Ayers
John Sirois
John Sirois
Nick Howard (Twitter)
Nick Howard (Twitter)
John Sirois
Nick Howard (Twitter)
Garrett Malmquist
Eric Ayers
Garrett Malmquist
Review request changed

Status: Closed (submitted)

Change Summary:

In fd2316eac40bc58eac21fafbd54092367f68b7ae. Thanks John, Nick, & Eric.

Stu Hood

   

This should likely be memoized, or maybe computed once per platform in that Subsystem?

Loading...