Find custom manifests in added directories.

Review Request #3886 — Created May 13, 2016 and submitted

jsirois
pants
jsirois/issues/3433
3433, 3438
61d737d...
pants-reviews
peiyu
Previously a `Jar` would only detect custom jar manifests directly added
as strings or files. This change fixes `Jar` to also detect custom
manifests added from dirs and expands test coverage.

 src/python/pants/backend/jvm/tasks/jar_task.py             | 45 +++++++++++++++++++++++++++++++++++++++++----
 tests/python/pants_test/backend/jvm/tasks/test_jar_task.py | 37 +++++++++++++++++++++++++++++++------
 2 files changed, 72 insertions(+), 10 deletions(-)

Locally green:

./pants --tag=-integration test \
  tests/python/pants_test/backend/jvm/tasks::

CI went green here:
http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3438/2/

  1. Tested in twitter repo, now getting

    Manifest-Version: 1.0
    Created-By: org.pantsbuild.tools.jar.JarBuilder
    Main-Class: com.twitter.scalding.Tool
    

    Thanks John!

  2. 
      
  1. Ship It!
  2. 
      
Review request changed

Status: Closed (submitted)

Change Summary:

Now on master:

git log -1 origin/master
commit 0a49de693cc7428ea283cfeff079b9161f9bef3d
Author: John Sirois <john.sirois@gmail.com>
Date:   Sun May 15 10:24:37 2016 -0600

    Find custom manifests in added directories.
    
    Previously a `Jar` would only detect custom jar manifests directly added
    as strings or files. This change fixes `Jar` to also detect custom
    manifests added from dirs and expands test coverage.
    
    Testing Done:
    Locally green:
    ```
    ./pants --tag=-integration test \
      tests/python/pants_test/backend/jvm/tasks::
    ```
    
    CI went green here:
      http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/branch/PR-3438/2/
    
    Bugs closed: 3433, 3438
    
    Reviewed at https://rbcommons.com/s/twitter/r/3886/
Loading...