Overview
Detect includes two Ivy detectors:
Ivy CLI Detector
Ivy Build Parse Detector
Ivy CLI Detector
Detector for Ant + Ivy projects, extracts direct and transitive dependencies using the
ivy:dependencytreeAnt task.
Requirements:
A valid
antexecutable must be available on the system.An
ivy.xmlandbuild.xmlfile must be present in the project.build.xmlmust contain a target with the<ivy:dependencytree>task.Apache Ant 1.6.0+ and Apache Ivy 2.4.0+ required.
Behavior:
Automatically discovers the target containing
<ivy:dependencytree>inbuild.xml.Executes
ant <targetName>to generate the dependency tree.Parses the output to construct a hierarchical dependency graph with parent-child relationships.
Falls back to the Ivy Build Parse Detector if
ivy:dependencytreeis unavailable.
To specify a custom Ant executable path, use the detect.ant.path property.
To facilitate dependency tree generation, the build.xml must contain a target with the ivy:dependencytree task:
<target name="dependencytree">
<ivy:resolve />
<ivy:dependencytree log="download-only" />
</target>Ivy Build Parse Detector
If ivy:dependencytree is unavailable, Detect will default to the Ivy Build Parse Detector, which extracts dependencies by parsing the ivy.xml file.
Parses
ivy.xmlfor direct dependency declarations only. Transitive dependencies are not resolved.Extracts the project name and version from
build.xml. If the project name or version is missing, the values are derived via Git from the project's directory or defaults.