Module ImportFrom alias alias alias alias alias alias alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad Call NameLoad NameLoad NameLoad attr attr Call NameLoad keyword Dict Str Str NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad keyword AttributeLoad NameLoad attr keyword Str NameStore body Expr Call AttributeLoad NameLoad attr Expr Yield AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults vararg body Expr Call AttributeLoad NameLoad attr BinOpBitOr Set Str Str Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Num ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Str Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam NameParam defaults vararg body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list Expr Call NameLoad Str Str Str Expr Call NameLoad Str Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad NameStore body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Str Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad BinOpAdd BinOpAdd Str Str Str attr Call AttributeLoad Str attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str decorator_list Expr Call NameLoad ListLoad Str Expr Call NameLoad ListLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Str Str Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad NameStore body For NameStore Call NameLoad BinOpAdd AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Str decorator_list decorator_list ClassDef bases NameLoad body ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad Str attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Dict Str Str With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad NameLoad attr NameLoad NameStore body With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore Call NameLoad GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad Num comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad Call NameLoad Str attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameStore body With Call AttributeLoad NameLoad attr NameLoad NameStore body With Call AttributeLoad NameLoad attr NameLoad NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore Call NameLoad GeneratorExp Call NameLoad Call AttributeLoad NameLoad attr Str NameLoad Num comprehension NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A __future__ absolute_import division generators nested_scopes print_function unicode_literals with_statement N/A os N/A re contextlib contextmanager textwrap dedent six.moves range twitter.common.collections maybe_list pants.backend.jvm.targets.java_agent JavaAgent pants.backend.jvm.targets.jvm_binary JvmBinary pants.backend.jvm.tasks.jar_task JarBuilderTask JarTask pants.build_graph.build_file_aliases BuildFileAliases pants.util.contextutil open_zip temporary_dir temporary_file pants.util.dirutil safe_mkdir safe_mkdtemp safe_rmtree pants_test.jvm.jar_task_test_base JarTaskTestBase BaseJarTaskTest N/A JarTaskTestBase N/A alias_groups N/A N/A self N/A N/A N/A N/A N/A N/A N/A super BaseJarTaskTest self alias_groups merge N/A BuildFileAliases targets N/A java_agent jvm_binary JavaAgent JvmBinary N/A property setUp N/A N/A self N/A N/A N/A N/A N/A N/A super BaseJarTaskTest self setUp N/A N/A self workdir N/A safe_mkdtemp N/A N/A self jar_task N/A N/A self prepare_execute N/A N/A self context N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super BaseJarTaskTest self tearDown N/A N/A self workdir N/A N/A N/A safe_rmtree N/A self workdir N/A jarfile N/A N/A self N/A N/A N/A N/A temporary_file root_dir N/A self workdir suffix .jar fd N/A N/A N/A N/A fd close N/A N/A N/A fd name N/A contextmanager assert_listing N/A N/A self jar N/A expected_items N/A N/A N/A N/A self assertEquals N/A N/A META-INF/ META-INF/MANIFEST.MF N/A set expected_items N/A set N/A N/A jar namelist N/A N/A JarTaskTest N/A BaseJarTaskTest N/A N/A MAX_SUBPROC_ARGS 50 TestJarTask N/A JarTask N/A execute N/A N/A self N/A N/A N/A N/A N/A task_type N/A N/A cls N/A N/A N/A N/A cls TestJarTask N/A classmethod setUp N/A N/A self N/A N/A N/A N/A N/A N/A super JarTaskTest self setUp N/A N/A N/A self set_options max_subprocess_args N/A self MAX_SUBPROC_ARGS N/A N/A self jar_task N/A N/A self prepare_execute N/A N/A self context N/A test_update_write N/A N/A self N/A N/A N/A N/A temporary_dir chroot N/A N/A _path N/A N/A N/A os path join chroot a/b/c N/A N/A safe_mkdir _path N/A data_file N/A N/A N/A os path join _path d.txt N/A N/A open data_file w fd N/A N/A N/A N/A fd write e N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile jar N/A N/A N/A N/A jar write data_file f/g/h N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar f/ f/g/ f/g/h N/A N/A N/A self assertEquals e N/A N/A jar read f/g/h N/A test_update_writestr N/A N/A self N/A N/A assert_writestr N/A N/A path contents N/A entries N/A N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile jar N/A N/A N/A N/A jar writestr path contents N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar entries N/A N/A N/A self assertEquals contents N/A N/A jar read path N/A N/A N/A assert_writestr a.txt b a.txt N/A N/A assert_writestr a/b/c.txt d a/ a/b/ a/b/c.txt N/A test_overwrite_write N/A N/A self N/A N/A N/A N/A temporary_dir chroot N/A N/A _path N/A N/A N/A os path join chroot a/b/c N/A N/A safe_mkdir _path N/A data_file N/A N/A N/A os path join _path d.txt N/A N/A open data_file w fd N/A N/A N/A N/A fd write e N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile overwrite True jar N/A N/A N/A N/A jar write data_file f/g/h N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar f/ f/g/ f/g/h N/A N/A N/A self assertEquals e N/A N/A jar read f/g/h N/A test_overwrite_writestr N/A N/A self N/A N/A N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile overwrite True jar N/A N/A N/A N/A jar writestr README 42 N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar README N/A N/A N/A self assertEquals 42 N/A N/A jar read README N/A test_custom_manifest N/A N/A self N/A N/A N/A contents Manifest-Version: 1.0
Created-By: test

 N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile overwrite True jar N/A N/A N/A N/A jar writestr README 42 N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar README N/A N/A N/A self assertEquals 42 N/A N/A jar read README N/A N/A N/A self assertNotEqual contents N/A N/A jar read META-INF/MANIFEST.MF N/A N/A N/A N/A self jar_task open_jar existing_jarfile overwrite False jar N/A N/A N/A N/A jar writestr META-INF/MANIFEST.MF contents N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar README N/A N/A N/A self assertEquals 42 N/A N/A jar read README N/A N/A N/A self assertEquals contents N/A N/A jar read META-INF/MANIFEST.MF N/A test_classpath N/A N/A self N/A N/A manifest_content N/A N/A classpath N/A N/A N/A N/A N/A N/A N/A Manifest-Version: 1.0
 Class-Path: {}
 Created-By: org.pantsbuild.tools.jar.JarBuilder

 format N/A N/A join N/A maybe_list classpath N/A assert_classpath N/A N/A classpath N/A N/A N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A N/A self jar_task open_jar existing_jarfile jar N/A N/A N/A N/A jar append_classpath N/A N/A N/A os path join N/A self workdir something_should_be_overwritten.jar N/A N/A N/A N/A self jar_task open_jar existing_jarfile jar N/A N/A N/A N/A jar append_classpath N/A N/A N/A N/A os path join N/A self workdir jar_path N/A jar_path classpath N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assertEqual N/A manifest_content classpath N/A N/A jar read META-INF/MANIFEST.MF N/A N/A N/A assert_classpath N/A a.jar N/A N/A assert_classpath N/A a.jar b.jar N/A test_update_jars N/A N/A self N/A N/A N/A N/A N/A self jarfile main_jar N/A N/A N/A N/A self jarfile included_jar N/A N/A N/A N/A N/A self jar_task open_jar main_jar jar N/A N/A N/A N/A jar writestr a/b c N/A N/A N/A N/A self jar_task open_jar included_jar jar N/A N/A N/A N/A jar writestr e/f g N/A N/A N/A N/A self jar_task open_jar main_jar jar N/A N/A N/A N/A jar writejar included_jar N/A N/A open_zip main_jar jar N/A N/A N/A N/A self assert_listing jar a/ a/b e/ e/f N/A test_overwrite_jars N/A N/A self N/A N/A N/A N/A N/A self jarfile main_jar N/A N/A N/A N/A self jarfile included_jar N/A N/A N/A N/A N/A self jar_task open_jar main_jar jar N/A N/A N/A N/A jar writestr a/b c N/A N/A N/A N/A self jar_task open_jar included_jar jar N/A N/A N/A N/A jar writestr e/f g N/A N/A N/A N/A self jar_task open_jar main_jar overwrite True jar N/A N/A i N/A range N/A N/A self MAX_SUBPROC_ARGS 1 N/A N/A N/A N/A jar writejar included_jar N/A N/A open_zip main_jar jar N/A N/A N/A N/A self assert_listing jar e/ e/f N/A N/A JarBuilderTest N/A BaseJarTaskTest N/A TestJarBuilderTask N/A JarBuilderTask N/A execute N/A N/A self N/A N/A N/A N/A N/A task_type N/A N/A cls N/A N/A N/A N/A cls TestJarBuilderTask N/A classmethod setUp N/A N/A self N/A N/A N/A N/A N/A N/A super JarBuilderTest self setUp N/A N/A N/A self set_options max_subprocess_args 100 N/A test_agent_manifest N/A N/A self N/A N/A N/A N/A N/A self add_to_build_file src/java/pants/agents N/A N/A N/A dedent 
        java_agent(
          name='fake_agent',
          premain='bob',
          agent_class='fred',
          can_redefine=True,
          can_retransform=True,
          can_set_native_method_prefix=True
        ) strip N/A java_agent N/A N/A self target src/java/pants/agents:fake_agent N/A context N/A N/A self context target_roots N/A java_agent N/A jar_builder_task N/A N/A self prepare_execute context N/A N/A N/A self add_to_runtime_classpath context java_agent N/A FakeAgent.class 0xCAFEBABE N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A jar_builder_task open_jar existing_jarfile jar N/A N/A N/A N/A jar_builder_task create_jar_builder jar jar_builder N/A N/A N/A N/A jar_builder add_target java_agent N/A N/A open_zip existing_jarfile jar N/A N/A N/A N/A self assert_listing jar FakeAgent.class N/A N/A N/A self assertEqual 0xCAFEBABE N/A N/A jar read FakeAgent.class N/A manifest N/A N/A N/A N/A jar read META-INF/MANIFEST.MF strip N/A all_entries N/A dict N/A N/A tuple N/A N/A re split \s*:\s* line 1 N/A line N/A N/A manifest splitlines N/A expected_entries N/A Agent-Class Premain-Class Can-Redefine-Classes Can-Retransform-Classes Can-Set-Native-Method-Prefix fred bob true true true N/A N/A N/A self assertEquals N/A set N/A N/A expected_entries items N/A N/A N/A set N/A N/A expected_entries items intersection N/A set N/A N/A all_entries items N/A test_manifest_items N/A N/A self N/A N/A N/A N/A N/A self add_to_build_file src/java/hello N/A N/A N/A dedent 
        jvm_binary(
          name='hello',
          main='hello.Hello',
          manifest_entries = {
            'Foo': 'foo-value',
            'Implementation-Version': '1.2.3',
          },
        ) strip N/A binary_target N/A N/A self target src/java/hello:hello N/A context N/A N/A self context target_roots N/A binary_target N/A N/A N/A self add_to_runtime_classpath context binary_target N/A Hello.class 0xDEADBEEF N/A jar_builder_task N/A N/A self prepare_execute context N/A N/A N/A self jarfile existing_jarfile N/A N/A N/A N/A jar_builder_task open_jar existing_jarfile jar N/A N/A N/A N/A jar_builder_task create_jar_builder jar jar_builder N/A N/A N/A N/A jar_builder add_target binary_target N/A N/A open_zip existing_jarfile jar N/A N/A manifest N/A N/A N/A N/A jar read META-INF/MANIFEST.MF strip N/A all_entries N/A dict N/A N/A tuple N/A N/A re split \s*:\s* line 1 N/A line N/A N/A manifest splitlines N/A expected_entries N/A Foo Implementation-Version foo-value 1.2.3 N/A N/A N/A self assertEquals N/A set N/A N/A expected_entries items N/A N/A N/A set N/A N/A expected_entries items intersection N/A set N/A N/A all_entries items N/A N/A