Update jar-tool to 0.1.9 and switch to use @argfile calling convention.

Review Request #1798 - Created Feb. 19, 2015 and submitted

Information
Jin Feng
pants
972, 1138
7171954...
Reviewers
pants-reviews
dturner-tw, jsirois, peiyu, zundel

The call to jar-tool can potentially generate very long arguments because
of arguments like -classpath, -jars, -files. Upgrade the jar-tool version
to 0.1.9 which supports @argfile calling convention, e.g.:
java -cp jar-tool-0.1.9.jar com.twitter.common.jar.tool.Main
-classpath=@classpath_argfile.txt

For external repos that will pick up this patch, you need to ensure 'jar-tool' jar_library in your BUILD.tools (or equivelant) to be updated to version 0.1.9.

1)
PANTS_DEV=1 ./pants goal tests::

2)
isort

3)
Tested inside Twitter repo using patched pants:

...
22:51:31 00:29 [jar-tool]DEBUG] Executing: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java -Xmx1G -cp ../../../.ivy2/science/cache/com.twitter.common/jar-tool/jars/jar-tool-0.1.9.jar:../../../.ivy2/science/cache/com.twitter.common/args/jars/args-0.2.29.jar:../../../.ivy2/science/cache/com.twitter.common/args-apt/jars/args-apt-0.1.27.jar:../../../.ivy2/science/cache/com.twitter.common/args-core/jars/args-core-0.1.27.jar:../../../.ivy2/science/cache/com.google.code.findbugs/jsr305/jars/jsr305-2.0.1.jar:../../../.ivy2/science/cache/com.google.guava/guava/bundles/guava-16.0.1.jar:../../../.ivy2/science/cache/commons-lang/commons-lang/jars/commons-lang-2.6.jar:../../../.ivy2/science/cache/com.twitter.common/base/jars/base-0.0.106.jar:../../../.ivy2/science/cache/com.twitter.common/quantity/jars/quantity-0.0.93.jar:../../../.ivy2/science/cache/com.twitter.common/collections/jars/collections-0.0.102.jar:../../../.ivy2/science/cache/com.twitter.common/util-system-mocks/jars/util-system-mocks-0.0.96.jar:../../../.ivy2/science/cache/com.twitter.common/net-util/jars/net-util-0.0.93.jar:../../../.ivy2/science/cache/commons-codec/commons-codec/jars/commons-codec-1.6.jar:../../../.ivy2/science/cache/com.twitter.common/io/jars/io-0.0.61.jar:../../../.ivy2/science/cache/commons-io/commons-io/jars/commons-io-2.4.jar:../../../.ivy2/science/cache/com.twitter.common/logging/jars/logging-0.0.71.jar:../../../.ivy2/science/cache/joda-time/joda-time/jars/joda-time-2.3.jar:../../../.ivy2/science/cache/org.joda/joda-convert/jars/joda-convert-1.5.jar com.twitter.common.jar.tool.Main -main=com.twitter.vit.vit_notification_timeline_live.storm.TypeSafeRunner -classpath=@/var/folders/60/fwyvh28x0vvb9nf47jgwk7p40000gq/T/tmplTqJmo -files=@/var/folders/60/fwyvh28x0vvb9nf47jgwk7p40000gq/T/tmpSDyIMg -update=false -compress=true -default_action=SKIP -skip=^META-INF/[^/]+.SF$,^META-INF/[^/]+.DSA$,^META-INF/[^/]+.RSA$ -policies=^META-INF/services/=CONCAT /Users/jinfeng/workspace/source/science/dist/storm-vit_notification_timeline_live-bundle/storm-vit_notification_timeline_live.jar args={'stderr': <pants.rwbuf.read_write_buffer.FileBackedRWBuf object at 0x110a73a90>, 'stdout': <pants.rwbuf.read_write_buffer.FileBackedRWBuf object at 0x110a73690>} at cwd=/Users/jinfeng/workspace/source/science

...

Note the -classpath=@<file> and -files=@<file> in the cmdline above.
Verified now with the --no-ng-daemons the jar is still successfully created.

4)
PR: https://github.com/pantsbuild/pants/pull/1138

5)

Travis CI: https://travis-ci.org/pantsbuild/pants/builds/51539652

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Eric Ayers
David Turner
Jin Feng
John Sirois
Jin Feng
Jin Feng
John Sirois
Eric Ayers
Jin Feng
Jin Feng
John Sirois
Jin Feng
John Sirois
Jin Feng
Review request changed

Status: Closed (submitted)

Loading...