diff --git a/.gitignore b/.gitignore
index 2b5ad6a1..7656807b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,6 @@ out/
# Mac
.DS_Store
+
+# Vim
+*.swp
diff --git a/src/main/scala-sbt-0.13/com/typesafe/sbteclipse/core/Eclipse.scala b/src/main/scala-sbt-0.13/com/typesafe/sbteclipse/core/Eclipse.scala
index 429a140c..308e045e 100644
--- a/src/main/scala-sbt-0.13/com/typesafe/sbteclipse/core/Eclipse.scala
+++ b/src/main/scala-sbt-0.13/com/typesafe/sbteclipse/core/Eclipse.scala
@@ -305,11 +305,17 @@ private object Eclipse extends EclipseSDTConfig {
srcEntries <- srcEntriesIoSeq.toList.sequence;
linkEntries <- srcLinkEntriesIoSeq.toList.sequence
) yield {
+ def classDirectory = srcEntries.flatMap { _.output }.distinct match {
+ case Nil =>
+ "bin"
+ case dir :: _ =>
+ dir
+ }
val entries = srcEntries ++ linkEntries ++
(projectDependencies map EclipseClasspathEntry.Project) ++
(externalDependencies map libEntry(buildDirectory, baseDirectory, relativizeLibs, state)) ++
(Seq(jreContainer) map EclipseClasspathEntry.Con) ++
- (Seq("bin") map EclipseClasspathEntry.Output)
+ (Seq(classDirectory) map EclipseClasspathEntry.Output)
{ entries map (_.toXml) }
}
}
diff --git a/src/main/scala-sbt-1.0/com/typesafe/sbteclipse/core/Eclipse.scala b/src/main/scala-sbt-1.0/com/typesafe/sbteclipse/core/Eclipse.scala
index fe34f9f6..bc206c14 100644
--- a/src/main/scala-sbt-1.0/com/typesafe/sbteclipse/core/Eclipse.scala
+++ b/src/main/scala-sbt-1.0/com/typesafe/sbteclipse/core/Eclipse.scala
@@ -305,11 +305,17 @@ private object Eclipse extends EclipseSDTConfig {
srcEntries <- srcEntriesIoSeq.toList.sequence;
linkEntries <- srcLinkEntriesIoSeq.toList.sequence
) yield {
+ def classDirectory = srcEntries.flatMap { _.output }.distinct match {
+ case Nil =>
+ "bin"
+ case dir :: _ =>
+ dir
+ }
val entries = srcEntries ++ linkEntries ++
(projectDependencies map EclipseClasspathEntry.Project) ++
(externalDependencies map libEntry(buildDirectory, baseDirectory, relativizeLibs, state)) ++
(Seq(jreContainer) map EclipseClasspathEntry.Con) ++
- (Seq("bin") map EclipseClasspathEntry.Output)
+ (Seq(classDirectory) map EclipseClasspathEntry.Output)
{ entries map (_.toXml) }
}
}
diff --git a/src/sbt-test/sbteclipse/02-contents/tasks.sbt b/src/sbt-test/sbteclipse/02-contents/tasks.sbt
index 79997097..9aab3b89 100644
--- a/src/sbt-test/sbteclipse/02-contents/tasks.sbt
+++ b/src/sbt-test/sbteclipse/02-contents/tasks.sbt
@@ -208,6 +208,8 @@ TaskKey[Unit]("verify-classpath-xml-subc") := {
error("""Expected .classpath of subc project to contain """)
if (!(classpath.child contains ))
error("""Expected .classpath of subc project to contain !""")
+ if (!(classpath.child contains ))
+ error("""Expected .classpath of subc project to contain """)
if (!(project.child contains ))
error("""Expected .project of subc project to contain !""")
}