sbt / sbt/sbt-eclipse

sbteclipse does not respect dependencies order

Open
#143 1 comment 0 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

I have started a new sbt project using Java EE 6 API with Glassfish Embedded for testing purpose.
This is represented by the following dependencies:

"org.glassfish.main.extras" % "glassfish-embedded-all" % "3.1.2.2" % "test",
"javax" % "javaee-api" % "6.0" % "provided"

The order of these dependencies is important for Eclipse since both will be referenced in Eclipse project. Indeed, using sbteclipse, javaee-api appears in first place and will then be used, leading to the error:

"java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file"

This is because javaee-api only contains an API without the implementation (which is in glassfish-embedded-all).

javaee-api should therefore not be used at all for tests but it is still necessary for sbt to compile the project correctly.

I then thought that it would be great if sbteclipse could respect the dependencies order as it is the case in Maven currently.

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

Reproduce the issue in sbteclipse with the Java EE and GlassFish dependencies shown, then inspect the generated Eclipse project definition and dependency order. Done means the generated Eclipse configuration preserves the intended dependency order and the reported test class-loading error is avoided.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.