Fix problem with too long classpath while starting scala repl: python part
Fix problem with too long classpath while starting scala repl: python part

I will write later wrap up for arg too max problem in pants in general but tl;dr is:
synthetic jar solution works for cases without custom classloaders. When custom classloaders comes to the game with their own strategy to consider classpath (using URLs from app classloader + using class.path property directly) without care much about classpath specified in jar things going to fail.

One of the cases - scala repl. So I've adopted solution with using facebook buck runner (https://github.com/facebook/buck/commit/a2070ad) to run scala repl. As runner fixes classloaders urls and class.path property it will work well with scala. As quickfix now - only for scala repl, maybe will be made more general in future.

Fix consist of two parts: java part with runner and python part for scala repl task.
This is python part.

PR: https://github.com/pantsbuild/pants/pull/2647
Java RB: https://rbcommons.com/s/twitter/r/3194/

Testing Done:
Locally, need to publish java artifact before

Bugs closed: 2647

Reviewed at https://rbcommons.com/s/twitter/r/3195/

benjyw/pants,15Dkatz/pants,jsirois/pants,mateor/pants,dbentley/pants,tdyas/pants,dbentley/pants,pombredanne/pants,pantsbuild/pants,gmalmquist/pants,pombredanne/pants,peiyuwang/pants,cevaris/pants,pantsbuild/pants,gmalmquist/pants,pombredanne/pants,twitter/pants,kwlzn/pants,baroquebobcat/pants,ericzundel/pants,twitter/pants,pantsbuild/pants,15Dkatz/pants,wisechengyi/pants,cevaris/pants,tdyas/pants,pantsbuild/pants,foursquare/pants,UnrememberMe/pants,dturner-tw/pants,15Dkatz/pants,peiyuwang/pants,fkorotkov/pants,fkorotkov/pants,dturner-tw/pants,twitter/pants,gmalmquist/pants,baroquebobcat/pants,baroquebobcat/pants,baroquebobcat/pants,manasapte/pants,peiyuwang/pants,kwlzn/pants,benjyw/pants,pantsbuild/pants,cevaris/pants,peiyuwang/pants,tdyas/pants,twitter/pants,dbentley/pants,dbentley/pants,manasapte/pants,wisechengyi/pants,mateor/pants,kwlzn/pants,twitter/pants,wisechengyi/pants,benjyw/pants,manasapte/pants,ity/pants,wisechengyi/pants,foursquare/pants,benjyw/pants,dturner-tw/pants,mateor/pants,dturner-tw/pants,pombredanne/pants,tdyas/pants,twitter/pants,foursquare/pants,ity/pants,tdyas/pants,dturner-tw/pants,foursquare/pants,ity/pants,15Dkatz/pants,wisechengyi/pants,UnrememberMe/pants,baroquebobcat/pants,peiyuwang/pants,pantsbuild/pants,jsirois/pants,landism/pants,cevaris/pants,gmalmquist/pants,ericzundel/pants,ericzundel/pants,lahosken/pants,fkorotkov/pants,landism/pants,15Dkatz/pants,peiyuwang/pants,twitter/pants,dturner-tw/pants,pombredanne/pants,wisechengyi/pants,mateor/pants,foursquare/pants,UnrememberMe/pants,manasapte/pants,ericzundel/pants,manasapte/pants,twitter/pants,landism/pants,lahosken/pants,lahosken/pants,landism/pants,wisechengyi/pants,15Dkatz/pants,ericzundel/pants,lahosken/pants,ity/pants,foursquare/pants,ericzundel/pants,manasapte/pants,UnrememberMe/pants,dbentley/pants,landism/pants,UnrememberMe/pants,benjyw/pants,wisechengyi/pants,ity/pants,baroquebobcat/pants,lahosken/pants,tdyas/pants,cevaris/pants,pombredanne/pants,pantsbuild/pants,foursquare/pants,ericzundel/pants,mateor/pants,baroquebobcat/pants,fkorotkov/pants,gmalmquist/pants,cevaris/pants,fkorotkov/pants,lahosken/pants,lahosken/pants,UnrememberMe/pants,peiyuwang/pants,UnrememberMe/pants,kwlzn/pants,tdyas/pants,foursquare/pants,landism/pants,cevaris/pants,baroquebobcat/pants,fkorotkov/pants,mateor/pants,dturner-tw/pants,wisechengyi/pants,baroquebobcat/pants,landism/pants,pombredanne/pants,15Dkatz/pants,manasapte/pants,mateor/pants,jsirois/pants,ity/pants,kwlzn/pants,15Dkatz/pants,fkorotkov/pants,kwlzn/pants,gmalmquist/pants,tdyas/pants,fkorotkov/pants,benjyw/pants,landism/pants,ericzundel/pants,kwlzn/pants,foursquare/pants,twitter/pants,gmalmquist/pants,UnrememberMe/pants,UnrememberMe/pants,peiyuwang/pants,lahosken/pants,mateor/pants,ity/pants,dbentley/pants,dbentley/pants,benjyw/pants,tdyas/pants