salmon-forest-59879
10/18/2019, 12:44 PMjar_library "foo"
. I need to make a tarball (or other archive) of these and make that available to a scala_library "bar"
at runtime. The archive should be on the classpath somehow, but NOT the individual jars in that comprise "foo".
How can i do this? I've tried my usual "create archive" trick of making a jvm_binary
target that has foo
as a dependency, then a jvm_app
wrapping that with archive = "tar"
, but now i need to make THIS a runtime dependency of a bar
. In prior cases, i'd get a tarball from this, but it doesn't seem to be happening
Ideas? (NB: again, the jars in foo
can NOT be directly on the runtime classpath of bar
. This is a hard requirement.)aloof-angle-91616
10/19/2019, 6:49 AMIn prior cases, i'd get a tarball from this, but it doesn't seem to be happeningwhat is the expected behavior and what is the failure?
aloof-angle-91616
10/19/2019, 6:50 AM(NB: again, the jars incan NOT be directly on the runtime classpath offoo
. This is a hard requirement.)bar
deploy_excludes
may be useful here, see https://www.pantsbuild.org/build_dictionary.html#bdict_jvm_binarysalmon-forest-59879
10/23/2019, 4:50 PMsalmon-forest-59879
10/23/2019, 4:51 PMresources(
name = "runtime-jar-resource",
sources = ["3rdparty/jvm:jarjar"],
dependencies = [
"3rdparty/jvm:jarjar",
]
)
jvm_binary(
name = "runtime-jar-bin",
source = "BUILD.pants", # Unused, but required by pants.
basename = "runtime_jar_shading",
dependencies = [
":runtime-jar-resource",
],
)
jvm_app(
name = "runtime-jar-shading",
archive = "tar",
dependencies = [":runtime-jar-bin", ],
bundles = [
],
)
salmon-forest-59879
10/23/2019, 4:52 PM3rdparty/jvm:jarjar
is a jar_library
which pulls some set of jars from the internetsalmon-forest-59879
10/23/2019, 4:53 PM./pants bundle :runtime-jar-shading
to produce a dist/.../runtime-jar-bin.tar
file which contains the jars from 3rdparty
salmon-forest-59879
10/23/2019, 4:53 PMsalmon-forest-59879
10/23/2019, 4:54 PMdist/.../...runtime-jar-bin.tar
which contains directory entries but no filessalmon-forest-59879
10/23/2019, 4:55 PMdependencies
to another jvm target and have that tarball appear in the classpath of that latter target, so i can find the tarball at runtimealoof-angle-91616
10/23/2019, 4:57 PM./pants binary :runtime-jar-bin
, that you get a jar with the appropriate files?salmon-forest-59879
10/23/2019, 4:57 PMsalmon-forest-59879
10/23/2019, 4:59 PMcreating dist/runtime_jar_shading.jar
but this didn't actually get createdsalmon-forest-59879
10/23/2019, 5:00 PMaloof-angle-91616
10/23/2019, 5:00 PMaloof-angle-91616
10/23/2019, 5:01 PMaloof-angle-91616
10/23/2019, 5:02 PM-ldebug
on the command line will print out not a ridiculous amount of outputsalmon-forest-59879
10/23/2019, 5:04 PMsalmon-forest-59879
10/23/2019, 5:04 PMaloof-angle-91616
10/23/2019, 5:04 PMaloof-angle-91616
10/23/2019, 5:04 PMsalmon-forest-59879
10/23/2019, 5:10 PMsalmon-forest-59879
10/23/2019, 5:11 PM./dist
either (!!)salmon-forest-59879
10/23/2019, 5:12 PMsalmon-forest-59879
10/23/2019, 5:12 PMbinary
on runtime-jar-shading
not runtime-jar-bin
. trying againsalmon-forest-59879
10/23/2019, 5:13 PM./dist
salmon-forest-59879
10/23/2019, 5:13 PMsalmon-forest-59879
10/23/2019, 6:54 PMaloof-angle-91616
10/23/2019, 6:54 PMaloof-angle-91616
10/23/2019, 6:54 PMaloof-angle-91616
10/23/2019, 6:55 PMaloof-angle-91616
10/23/2019, 6:55 PMsalmon-forest-59879
10/23/2019, 6:56 PMsalmon-forest-59879
10/23/2019, 6:56 PMaloof-angle-91616
10/23/2019, 6:56 PMaloof-angle-91616
10/23/2019, 6:56 PMsalmon-forest-59879
10/23/2019, 9:03 PMaloof-angle-91616
10/29/2019, 4:31 PM