Use `JarBuilder` to build jars.

Review Request #3851 — Created May 9, 2016 and submitted

jsirois
pants
jsirois/issues/3371
3371, 3374
3297
559bb55...
pants-reviews
peiyu
Previously the python zipfile library was used, leading to missing
directory entries.  Fix the existing test to cover this.

 src/python/pants/backend/jvm/tasks/bundle_create.py             |  7 ++++---
 src/python/pants/fs/archive.py                                  |  5 ++---
 tests/python/pants_test/backend/jvm/tasks/BUILD                 |  4 ++++
 tests/python/pants_test/backend/jvm/tasks/test_bundle_create.py | 36 +++++++++++++++++++++++++-----------
 tests/python/pants_test/testutils/BUILD                         |  4 ----
 tests/python/pants_test/testutils/file_test_util.py             | 26 --------------------------
 6 files changed, 35 insertions(+), 47 deletions(-)
CI went green here:
  http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3374/1/
JS
PE
  1. didn't realize the implications using zipfile would lead to missing directory entries! Thanks John

  2. What does it mean to have public API under tests?

    1. We do export 1 test-support sdist: https://pypi.python.org/pypi/pantsbuild.pants.testinfra
      And that transitively reaches here:

      $ ./pants dependencies --internal-only tests/python/pants_test:test_infra | xargs ./pants filemap | grep file_test_util.py
      tests/python/pants_test/testutils/file_test_util.py tests/python/pants_test/testutils:file_test_util
      
  3. 
      
JS
JS
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit e1b2d6808f8fe2cdc6964a7f1efd816e2678c70e
Author: John Sirois <john.sirois@gmail.com>
Date:   Mon May 9 18:24:20 2016 -0600

    Use `JarBuilder` to build jars.
    
    Previously the python zipfile library was used, leading to missing
    directory entries.  Fix the existing test to cover this.
    
    Testing Done:
    CI went green here:
      http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3374/1/
    
    Bugs closed: 3371, 3374
    
    Reviewed at https://rbcommons.com/s/twitter/r/3851/
Loading...