sbt / sbt/sbt-eclipse

sbt-eclipse generates project definition for wrong project

Open
#180 0 comments 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 use sbt-eclipse 2.4.0

~/.sbt/0.13/plugins$ cat build.sbt
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")

resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"

And have the following build.sbt:

import com.typesafe.sbt.SbtAtmosPlay.atmosPlaySettings

libraryDependencies ++= Seq(
  "org.webjars" %% "webjars-play" % "2.2.0",
  "org.webjars" % "angularjs" % "1.2.0-rc.3",
  "org.webjars" % "bootstrap" % "2.3.2"
)

name := "ImageMaster"

version := "1.0-SNAPSHOT"

play.Project.playScalaSettings

atmosPlaySettings

val ImageMaster = project.in(file("."))
  .aggregate(ImageCommon).dependsOn(ImageCommon)

lazy val ImageCommon = RootProject(file("../ImageCommon/"))

ImageCommon is a library project which is on the same directory level as ImageMaster as it is used across many different projects.

When I run the eclipse task, it will generate the eclipse files for ImageCommon. I need to uncomment the the line with ".aggregate(ImageCommon).dependsOn(ImageCommon)", run the eclipse task and add the ImageCommon project within eclipse to the build path to get a correctly compiling project.

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 with the supplied build.sbt and the eclipse task, reproducing the generated project definition for ImageMaster and ImageCommon. Compare the generated Eclipse files with the project that should be selected, then verify the result with the aggregate and dependsOn settings enabled without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.