average-breakfast-91545
06/26/2024, 11:11 AMjvm_artifacts
in my 3rdparty directory, and run generate-lockfiles. I have a lockfile containing jars. How do I get pants to copy the resulting jars over to the dist directory? I haven't any java code, only a pex_binary. I tried adding the jars as a dep to that, but that seemed to make no difference.fast-nail-55400
06/26/2024, 12:54 PMdeploy_jar
or jvm_war
target types will be of use?fast-nail-55400
06/26/2024, 12:54 PMpackage
goal applies to them.average-breakfast-91545
06/26/2024, 1:18 PMjvm_artifact(
name="hadoop-cloud",
group="org.apache.spark",
artifact="spark-hadoop-cloud_2.13",
version="3.5.1",
)
deploy_jar(
name="spark-jars",
dependencies=[":hadoop-cloud"],
main="",
)
src/ingest/BUILD
pex_binary(
name="spark",
tags=["artifact"],
entry_point="spark_script.py",
dependencies=[
"!!3rdparty/python:ingest#awsglue-dev",
"!!3rdparty/python:ingest#pyspark",
"!!3rdparty/python:shared#click",
"3rdparty/java:spark-jars"
],
)
Running a pants package yields me a spark.pex, but doesn't seem to do anything jar-wise. I can explicitly pants package 3rdparty/java though, so maybe that'll have to do for today.fast-nail-55400
06/26/2024, 1:23 PMdeploy_jar
as a "resource" target. Then include that resource target as a dependency of the pex.average-breakfast-91545
06/26/2024, 1:24 PMfast-nail-55400
06/26/2024, 1:25 PMpkgutil.get_data
or importlib.resources.*
fast-nail-55400
06/26/2024, 1:25 PMaverage-breakfast-91545
06/26/2024, 1:26 PMfast-nail-55400
06/26/2024, 1:28 PMpants package
with multiple targets i.e., the pex and the deploy_jar when run in CI?