sbt / sbt/sbt-eclipse

[error] a required artifact is not listed by module descriptor: *#*!*.*

Open
#364 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
712
Forks
163
PR merge metrics
No merged PRs in 30d

Description

When I link my projects together in a certain way, sbt produces this error when running sbt eclipse.

[info] About to create Eclipse project files for your project(s).
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
[error] a required artifact is not listed by module descriptor: *#*!*.*
...

Everything else works fine, compiling, building assemblies,... Even the project generation doesn't seem to suffer.

One special thing about the projects is that they transitively depend on other modules in the project.

Say my project has 5 modules, mA, mB, mC, mD, mE.
And one extnernal dependency (which can be used both as a source as a binary dependency) d1.

They depend like this.


mA <- mB <- mC <- mD -
       ^     ` <- mE - `
       |               |
        ` d1 < -------´
        

It goes sour in modules D and E, but if I look at the dependency tree everything looks as expected (e.g. version conflicts are resolved as expected).

One thing I might add is that I systemically use EclipseKeys.withSource := true.
And when I run sbt updateSbtClassifiers, I get a somewhat unexpected failed download:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;5.2.4!sbteclipse-plugin.jar(src)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

I will note, the latter was observed by trying pretty much anything, without any success.
As stated, everything works, I'd just like to get some understanding why it produces the error and ideally how to avoid it, as seeing errors from "build output" hurts the eyes.

sbt: 1.1.4
sbt-eclipse: 5.2.4
scala: 2.12.5

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported multi-module dependency graph with sbt 1.1.4 and sbt-eclipse 5.2.4, then run sbt eclipse and sbt updateSbtClassifiers. Trace how transitive dependencies and EclipseKeys.withSource := true are handled in the Eclipse project generation path; done means the cause is explained and the repeated artifact errors are eliminated or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.