Skip to main content
Version: 2.24 (prerelease)

jvm_artifacts


Generate a jvm_artifact target for each dependency in pom.xml file.

Backend: pants.backend.experimental.scala


description

str | None
default: None

A human-readable description of the target.

Use pants list --documented :: to see all targets with descriptions.

package_mapping

dict
default: FrozenDict({})

A mapping of jvm artifacts to a list of the packages they provide.

For example, {"com.google.guava:guava": ["com.google.common.**"]}.

Any unspecified jvm artifacts will use a default. See the packages field from the jvm_artifact target for more information.

resolve

str | None
default: None

The resolve from [jvm].resolves that this artifact should be included in.

If not defined, will default to [jvm].default_resolve.

When generating a lockfile for a particular resolve via the coursier-resolve goal, it will include all artifacts that are declared compatible with that resolve. First-party targets like java_source and scala_source also declare which resolve they use via the resolve field; so, for your first-party code to use a particular jvm_artifact target, that artifact must be included in the resolve used by that code.

source

str | None
default: 'pom.xml'

A single file that belongs to this target.

Path is relative to the BUILD file's directory, e.g. source='example.ext'.

tags

Iterable[str] | None
default: None

Arbitrary strings to describe a target.

For example, you may tag some test targets with 'integration_test' so that you could run pants --tag='integration_test' test :: to only run on targets with that tag.