def setup_parser(cls, option_group, args, mkflag): JvmBinaryTask.setup_parser(option_group, args, mkflag) option_group.add_option( mkflag("fail-fast"), mkflag("fail-fast", negate=True), dest="fail_fast", default=False, action="callback", callback=mkflag.set_bool, help= "[%default] Fail fast if duplicate classes/resources are found.")
def setup_parser(cls, option_group, args, mkflag): JvmBinaryTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("compressed"), mkflag("compressed", negate=True), dest="binary_create_compressed", default=True, action="callback", callback=mkflag.set_bool, help="[%default] Create a compressed binary jar.") option_group.add_option(mkflag("zip64"), mkflag("zip64", negate=True), dest="binary_create_zip64", default=False, action="callback", callback=mkflag.set_bool, help="[%default] Create the binary jar with zip64 extensions.")
def setup_parser(cls, option_group, args, mkflag): JvmBinaryTask.setup_parser(option_group, args, mkflag) archive_flag = mkflag("archive") option_group.add_option(archive_flag, dest="bundle_create_archive", type="choice", choices=list(archive.TYPE_NAMES), help="[%%default] Create an archive from the bundle. " "Choose from %s" % sorted(archive.TYPE_NAMES)) option_group.add_option(mkflag("archive-prefix"), mkflag("archive-prefix", negate=True), dest="bundle_create_prefix", default=False, action="callback", callback=mkflag.set_bool, help="[%%default] Used in conjunction with %s this packs the archive " "with its basename as the path prefix." % archive_flag)
def __init__(self, context): JvmBinaryTask.__init__(self, context) self.outdir = os.path.abspath( context.options.jvm_binary_create_outdir or context.config.get('binary-create', 'outdir', default=context.config.getdefault('pants_distdir')) ) self.compression = ZIP_DEFLATED if context.options.binary_create_compressed else ZIP_STORED self.zip64 = ( context.options.binary_create_zip64 or context.config.getbool('binary-create', 'zip64', default=False) ) self.deployjar = context.options.jvm_binary_create_deployjar context.products.require('jars', predicate=self.is_binary) context.products.require_data('classes_by_target') context.products.require_data('resources_by_target') if self.deployjar: self.require_jar_dependencies()
def __init__(self, context): JvmBinaryTask.__init__(self, context) self.outdir = ( context.options.jvm_binary_create_outdir or context.config.get('bundle-create', 'outdir', default=context.config.getdefault('pants_distdir')) ) self.prefix = context.options.bundle_create_prefix def fill_archiver_type(): self.archiver_type = context.options.bundle_create_archive # If no option specified, check if anyone is requiring it if not self.archiver_type: for archive_type in archive.TYPE_NAMES: if context.products.isrequired(archive_type): self.archiver_type = archive_type fill_archiver_type() self.deployjar = context.options.jvm_binary_create_deployjar if not self.deployjar: self.context.products.require('jars', predicate=self.is_binary) self.require_jar_dependencies()
def __init__(self, context): JvmBinaryTask.__init__(self, context) self.require_jar_dependencies() self.fail_fast = context.options.fail_fast
def setup_parser(cls, option_group, args, mkflag): JvmBinaryTask.setup_parser(option_group, args, mkflag) option_group.add_option(mkflag("fail-fast"), mkflag("fail-fast", negate=True), dest="fail_fast", default=False, action="callback", callback=mkflag.set_bool, help="[%default] Fail fast if duplicate classes/resources are found.")