bazel-contrib / bazel-contrib/rules_jvm_external

Unable to fetch source jars

Open
#664 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
373
Forks
301
Avg merge
7d 17h
Merged PRs (30d)
3

Description

Hi,

When we run `bazel run @unpinned_maven//:pin` we notice the following change in our `maven_deps.json` file:

```
{
"coord": "xmlpull:xmlpull:jar:sources:1.1.3.1",
"dependencies": [],
"directDependencies": [],
"exclusions": [
"org.slf4j:slf4j-log4j12"
],
"file": null
}

```

It appears rules_external is having trouble finding the `source jar` for this dependency.

**Bazel Version**

4.2

**Rules External Version**

3.3

**Additional Configs**

```
fetch_sources = False,
strict_visibility = True,
version_conflict_policy = "pinned",
maven_install_json = "//3rdparty/java/deps:maven_install.json",
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `bazel run @unpinned_maven//:pin` with Bazel 4.2 and Rules External 3.3, then inspect the `xmlpull:xmlpull:jar:sources:1.1.3.1` entry in `maven_deps.json`. Check how the source jar is resolved under the shown configuration. Done means the source dependency is fetched successfully rather than recorded with `"file": null`.

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.