microsoft / microsoft/component-detection

Ivy scan fails when ivy.jar is missing

Open
#1,573 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
553
Forks
135
Avg merge
20h 58m
Merged PRs (30d)
6

Description

Hi guys,

I'm trying to use component-detection to scan Ant + Ivy projects, but encounter the following issue when running on an environment with ant and jdk installed:
```
[17:53:13 INF] Finding components...
[17:53:13 INF] No instructions received to scan docker images.
[17:53:13 INF] Preparing Rust component detection
[17:53:13 INF] Starting enumeration of /ivy/ivy-demo
[17:53:13 INF] Enumerated 4 files and 0 directories in 00:00:00.0293762
[17:53:13 INF] Detection mode: FALLBACK
[17:53:13 INF] No Cargo.toml files found; ownership and metadata cache unavailable
[17:53:13 INF] FALLBACK mode: Processing 0 Cargo.toml/Cargo.lock files
[17:53:13 INF] Processing /ivy-demo/ivy.xml.
[17:53:14 ERR] Ant command failed with return code 1
[17:53:14 WRN] Ant command stderr:
BUILD FAILED
/tmp/vule5dto.uz1/build.xml:11: Compile failed; see the compiler error output for details.
```
But when I add ivy.jar into directory .ant/lib, the scan works fine.
According to [Ivy Detection](https://github.com/microsoft/component-detection/blob/main/docs/detectors/ivy.md), I don't see ivy.jar is mentioned, but based on the way Ivy Detection works with [IvyComponentDetectionAntTask.java](https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/ivy/Resources/java-src/IvyComponentDetectionAntTask.java) I believe ivy.jar is mandatory.

Contributor guide

Open the contributing guide

Research direction

Start with docs/detectors/ivy.md and src/Microsoft.ComponentDetection.Detectors/ivy/Resources/java-src/IvyComponentDetectionAntTask.java, then reproduce the Ant + Ivy scan without ivy.jar in .ant/lib. Confirm the expected handling of the missing dependency and ensure the documented or implemented behavior matches a successful scan.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.