Skip to main content
Version: 2.18 (deprecated)

java-infer


Options controlling which dependencies will be inferred for Java targets.

Backend: pants.backend.experimental.java

Config section: [java-infer]

Basic options

consumed_types

--[no-]java-infer-consumed-types
PANTS_JAVA_INFER_CONSUMED_TYPES
pants.toml
[java-infer]
consumed_types = <bool>
default: True

Infer a target's dependencies by parsing consumed types from sources.

imports

--[no-]java-infer-imports
PANTS_JAVA_INFER_IMPORTS
pants.toml
[java-infer]
imports = <bool>
default: True

Infer a target's dependencies by parsing import statements from sources.

third_party_import_mapping

--java-infer-third-party-import-mapping="{'key1': val1, 'key2': val2, ...}"
PANTS_JAVA_INFER_THIRD_PARTY_IMPORT_MAPPING
pants.toml
[java-infer.third_party_import_mapping]
key1 = val1
key2 = val2
...
default: {}

A dictionary mapping a Java package path to a JVM artifact coordinate (GROUP:ARTIFACT) without the version.

See jvm_artifact for more information on the mapping syntax.

Advanced options

None

Deprecated options

None

None