@@ -6,37 +6,37 @@ def _maven_artifacts_impl(ctx):
6
6
info = target [MavenInfo ]
7
7
8
8
# Merge together all the binary jars
9
- temp_bin_jar = ctx .actions . declare_file ( "%s-temp.jar" % ctx . attr . name )
10
- combine_jars (ctx , ctx .executable ._singlejar , info .artifact_jars .to_list (), temp_bin_jar )
9
+ bin_jar = ctx .outputs . binjar
10
+ combine_jars (ctx , ctx .executable ._singlejar , info .artifact_jars .to_list (), bin_jar )
11
11
src_jar = ctx .outputs .srcjar
12
12
combine_jars (ctx , ctx .executable ._singlejar , info .source_jars .to_list (), src_jar )
13
13
14
- # Now generate the module info
15
- module_jar = ctx .actions .declare_file ("%s-module.jar" % ctx .attr .name )
16
-
17
- args = ctx .actions .args ()
18
- args .add_all (["--coordinates" , ctx .attr .maven_coordinates ])
19
- args .add_all (["--in" , temp_bin_jar .path ])
20
- args .add_all (["--out" , module_jar .path ])
21
- if len (ctx .attr .module_uses_services ) > 0 :
22
- args .add_all (ctx .attr .module_uses_services , before_each = "--uses" )
23
-
24
- paths = [file .path for file in target [GatheredJavaModuleInfo ].module_jars .to_list ()]
25
- if len (paths ) > 0 :
26
- args .add_all (["--module-path" , ctx .host_configuration .host_path_separator .join (paths )])
27
- if len (ctx .attr .module_exclude_patterns ) > 0 :
28
- args .add_all (ctx .attr .module_exclude_patterns , before_each = "--exclude" )
29
-
30
- ctx .actions .run (
31
- mnemonic = "BuildModuleJar" ,
32
- inputs = [temp_bin_jar ] + target [GatheredJavaModuleInfo ].module_jars .to_list (),
33
- outputs = [module_jar ],
34
- executable = ctx .executable ._generate_module ,
35
- arguments = [args ],
36
- )
37
-
38
- # Now merge the module info and the binary jars
39
- combine_jars (ctx , ctx .executable ._singlejar , [temp_bin_jar , module_jar ], ctx .outputs .binjar )
14
+ # # Now generate the module info
15
+ # module_jar = ctx.actions.declare_file("%s-module.jar" % ctx.attr.name)
16
+ #
17
+ # args = ctx.actions.args()
18
+ # args.add_all(["--coordinates", ctx.attr.maven_coordinates])
19
+ # args.add_all(["--in", temp_bin_jar.path])
20
+ # args.add_all(["--out", module_jar.path])
21
+ # if len(ctx.attr.module_uses_services) > 0:
22
+ # args.add_all(ctx.attr.module_uses_services, before_each = "--uses")
23
+ #
24
+ # paths = [file.path for file in target[GatheredJavaModuleInfo].module_jars.to_list()]
25
+ # if len(paths) > 0:
26
+ # args.add_all(["--module-path", ctx.host_configuration.host_path_separator.join(paths)])
27
+ # if len(ctx.attr.module_exclude_patterns) > 0:
28
+ # args.add_all(ctx.attr.module_exclude_patterns, before_each = "--exclude")
29
+ #
30
+ # ctx.actions.run(
31
+ # mnemonic = "BuildModuleJar",
32
+ # inputs = [temp_bin_jar] + target[GatheredJavaModuleInfo].module_jars.to_list(),
33
+ # outputs = [module_jar],
34
+ # executable = ctx.executable._generate_module,
35
+ # arguments = [args],
36
+ # )
37
+ #
38
+ # # Now merge the module info and the binary jars
39
+ # combine_jars(ctx, ctx.executable._singlejar, [temp_bin_jar, module_jar], ctx.outputs.binjar)
40
40
41
41
defaultInfo = target [DefaultInfo ]
42
42
0 commit comments