Skip to content

Ivy CLI Detector: Transitive Dependency Support#1655

Open
zahidblackduck wants to merge 10 commits intomasterfrom
dev/zahidblackduck/IDETECT-4963-ivy-transitive-dependency
Open

Ivy CLI Detector: Transitive Dependency Support#1655
zahidblackduck wants to merge 10 commits intomasterfrom
dev/zahidblackduck/IDETECT-4963-ivy-transitive-dependency

Conversation

@zahidblackduck
Copy link
Collaborator

@zahidblackduck zahidblackduck commented Feb 19, 2026

JIRA Ticket

IDETECT-4963

Description

This merge request introduces a new Ivy CLI Detector that resolves transitive dependencies for Apache Ant + Ivy projects by leveraging the ivy:dependencytree task. Previously, all the dependencies were reported as direct dependencies by the existing LOW accuracy Ivy Build Parse Detector regardless they were transitive dependencies or not..

The new detector executes ant <targetName> to generate a complete dependency tree, then parses the hierarchical structure to identify direct dependencies, transitive dependencies, and parent-child relationships.

Requirements

  • Apache Ant 1.6.0+
  • Apache Ivy 2.4.0+
  • ivy:dependencytree task in build.xml

Implementation

The detector automatically discovers the ivy:dependencytree target in build.xml and executes it. If not found, detection falls back to the existing xml parsing based Ivy Build Parse Detector (direct dependencies only).

User Action Required

Add the ivy:dependencytree target to build.xml:

<target name="dependencytree">
    <ivy:resolve />
    <ivy:dependencytree log="download-only" />
</target>

This is required to generate the dependency tree for parsing.

New Detect Properties

detect.ant.path=<path> - Specifies the ant executable path (optional)

@zahidblackduck zahidblackduck self-assigned this Feb 19, 2026
@zahidblackduck zahidblackduck marked this pull request as draft February 20, 2026 06:17
@zahidblackduck zahidblackduck changed the title DRAFT: Ivy Detector Transitive Dependency Ivy CLI Detector: Transitive Dependency Support Feb 25, 2026
@zahidblackduck zahidblackduck marked this pull request as ready for review March 2, 2026 08:37
@zahidblackduck zahidblackduck requested a review from cpottsbd March 13, 2026 10:38
If `ivy:dependencytree` is unavailable, [detect_product_short] will default to the Ivy Build Parse Detector, which extracts dependencies by parsing the `ivy.xml` file.

* Parses `ivy.xml` for direct dependency declarations only. Transitive dependencies are not resolved.
* Extracts the project's name and version from `build.xml`. If missing, it defers to values derived by git, from the project's directory, or defaults.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

  • 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.

### New features

* Support for the Conda Tree–based detector has been added. For more details, see [Conda Tree](packagemgrs/conda.md#conda-tree-detector).
* Ivy CLI Detector, leveraging the `ivy:dependencytree` Ant task to extract direct and transitive dependencies for Ant + Ivy projects. Falls back to the Ivy Build Parse Detector if the task is not present in `build.xml`. For further information, see [Ivy (Ant) support](packagemgrs/ivy.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest leaving this part out of the release notes as you have this information in the ivy.md page:
"Falls back to the Ivy Build Parse Detector if the task is not present in build.xml."

@zahidblackduck zahidblackduck requested a review from cpottsbd March 13, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants