witty-crayon-22786
03/18/2016, 8:10 PMancient-stone-50795
03/18/2016, 8:11 PMwitty-crayon-22786
03/18/2016, 8:11 PMwitty-crayon-22786
03/18/2016, 8:11 PMfrom pants.backend.jvm.targets.exclude import Exclude
from pants.backend.jvm.targets.jvm_binary import JarRules, JvmBinary
# The hadoop cluster provides the appropriate versions of these jars.
ON_HADOOP_CLUSTER_EXCLUDES = [
Exclude('org.slf4j'),
Exclude('commons-httpclient','commons-httpclient'),
Exclude('org.apache', 'hadoop-core'),
Exclude('org.apache', 'hadoop-lzo'),
Exclude('com.hadoop', 'hadoop-lzo'),
Exclude('org.apache.hadoop'),
Exclude('org.apache.hbase')
]
class TwitterHadoopBinary(JvmBinary):
"""A binary that is suitable for running on the Hadoop cluster.
Invoking the ``binary`` or ``bundle`` goal on one of these targets creates a binary jar that
excludes any dependencies already provided by the hadoop cluster.
"""
def __init__(
self,
name,
main,
basename=None,
source=None,
resources=None,
excludes=None,
deploy_jar_rules=None,
deploy_excludes=None,
**kwargs):
super(TwitterHadoopBinary, self).__init__(
name=name,
main=main,
basename=basename,
source=source,
resources=resources,
excludes=excludes,
deploy_jar_rules=deploy_jar_rules,
deploy_excludes=(deploy_excludes or []) + ON_HADOOP_CLUSTER_EXCLUDES,
**kwargs)
bored-art-40741
03/18/2016, 8:11 PMjolly-chef-92794
03/18/2016, 8:13 PMwitty-crayon-22786
03/18/2016, 8:14 PMjolly-chef-92794
03/18/2016, 8:14 PMwitty-crayon-22786
03/18/2016, 8:14 PMjolly-chef-92794
03/18/2016, 8:14 PMwitty-crayon-22786
03/18/2016, 8:14 PMwitty-crayon-22786
03/18/2016, 8:15 PMwitty-crayon-22786
03/18/2016, 8:15 PMjolly-chef-92794
03/18/2016, 8:15 PMprovided
as a keyword is syntactic sugar for compile intransitive
in my patch, and we could go all the way to compile intransitive test
jolly-chef-92794
03/18/2016, 8:16 PMprovided
as a scope and just require people state compile intransitive test
when that’s what they needjolly-chef-92794
03/18/2016, 8:16 PMprovided
witty-crayon-22786
03/18/2016, 8:16 PMwitty-crayon-22786
03/18/2016, 8:17 PMwitty-crayon-22786
03/18/2016, 8:17 PMcompile/test/deploy
don't mix with intransitive/direct/transitive
witty-crayon-22786
03/18/2016, 8:17 PMwitty-crayon-22786
03/18/2016, 8:19 PMjolly-chef-92794
03/18/2016, 8:19 PMcompile
and test
, or both intransitive
and transitive
.
But on the other hand, they all affect how the classpath is built with respect to the dependency graphwitty-crayon-22786
03/18/2016, 8:20 PMwitty-crayon-22786
03/18/2016, 8:21 PMjolly-chef-92794
03/18/2016, 8:21 PMwitty-crayon-22786
03/18/2016, 8:26 PMwitty-crayon-22786
03/18/2016, 8:26 PMjolly-chef-92794
03/18/2016, 8:27 PMjolly-chef-92794
03/18/2016, 8:27 PMjolly-chef-92794
03/18/2016, 8:27 PMtransitive
, to make sure you’ve resolved all the jars in ivy etc