Find java distributions in well known locations.

Review Request #2242 - Created May 18, 2015 and submitted

Information
John Sirois
pants
jsirois/java_distribution/find_more
1568
9167169...
Reviewers
pants-reviews
fkorotkov, mateor, patricklaw, zundel

Both OSX and linux have well-known tools and conventions for discovering
java distributions. This change adds support for scanning the
/usr/lib/jvm dir on linux and using the /usr/libexec/java_home tool
on OSX along with test coverage for both.

In the course of adding new tests, old tests are refactored and, in
particular, the monolithic locate test is broken apart into tightly
scoped tests.

src/python/pants/java/distribution/distribution.py | 129 +++++++++++--
tests/python/pants_test/java/distribution/test_distribution.py | 497 +++++++++++++++++++++++++++++++++++---------------
2 files changed, 457 insertions(+), 169 deletions(-)

I discovered the /usr/libexec/java_home OSX tool when working on fixing
the OSX CI break here:
https://travis-ci.org/pantsbuild/pants-for-travis-osx-ci/builds/62840365

I went a different route with the fix
(https://rbcommons.com/s/twitter/r/2241/), but wanted to circle back and
add the support for ease of setup in small distributed projects using
pants.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/63231191

John Sirois
John Sirois
Eric Ayers
Eric Ayers
Mateo Rodriguez
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...