Invoke jvm doc tools via java.

Review Request #2313 — Created June 3, 2015 and submitted

jsirois
pants
jsirois/javadoc/via_jvm_tools
162, 1545, 1629
7dd73e5...
pants-reviews
benjyw, ity, stuhood
This removes dependence on the `javadoc` and `scaladoc` binaries which
immediately opens up javadoc and scaladoc testing on Travis-CI.

For `javadoc` this is not so important today, since the new invocation
scheme requires a jdk for `tools.jar` which necessarily means `javadoc`
is present.  That said, it does set the stage for invoking javadoc
using the correct JDK based on the repo-wide or per-target JDK
constraints.

 src/python/pants/backend/jvm/tasks/BUILD                      | 16 +++++++++-------
 src/python/pants/backend/jvm/tasks/javadoc_gen.py             | 52 +++++++++++++++++++++++++++-----------------------
 src/python/pants/backend/jvm/tasks/jvmdoc_gen.py              |  4 ----
 src/python/pants/backend/jvm/tasks/scaladoc_gen.py            | 51 ++++++++++++++++++++++++++-----------------------
 tests/python/pants_test/tasks/BUILD                           |  3 ++-
 tests/python/pants_test/tasks/test_jar_publish_integration.py |  9 ---------
 6 files changed, 66 insertions(+), 69 deletions(-)

Ran a --combined gen locally via:

$ PANTS_DEV=1 ./pants doc.javadoc --open doc.scaladoc --open src/{java,scala}::

This opened up the 2 expected API doc pages.

The --no-combined cases are tested by the JarPublishIntegrationTest
already - now running in CI.

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

JS
JS
  1. NB: There is a lot more pre-existing broken here with the jvmdoc_gen.py ecosystem (custom multiproc, improper invalidation for --[no-]combined toggles, ...), this change tries to stay scoped to solving http://github.com/pantsbuild/pants/issues#issue/162 and http://github.com/pantsbuild/pants/issues#issue/1545
  2. 
      
JS
ST
  1. Looks great! Thanks a lot for knocking this one out John.

  2. 
      
IT
  1. lgtm!

  2. 
      
JS
  1. Thanks folks - submitted @ https://github.com/pantsbuild/pants/commit/6e04032e366a11409ae73fd11a8b6c36170f70be
  2. 
      
JS
Review request changed

Status: Closed (submitted)

Loading...