sbt-eclipse icon indicating copy to clipboard operation
sbt-eclipse copied to clipboard

lib dependencies aren't visible in eclipse project

Open ghost opened this issue 12 years ago • 1 comments

If the project definition is as follows:

 lazy val project = Project(id = "core-project",
    base = file("modules/core-project")
  )

and the core-project has unmanaged libraries in it's related lib directory, then the .classpath file will contain incorrect library entries related to this unmanaged libraries.

The project's file structure looks like:

modules\core-project\src\<some sources>
project\Build.scala
project\plugins.sbt

The .classpath looks like:

<classpath>
  <classpathentry output="target\scala-2.9.1\classes" path="src\main\scala" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\classes" path="src\main\java" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\test-classes" path="src\test\scala" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\test-classes" path="src\test\java" kind="src"></classpathentry>
  <classpathentry path="..\..\modules\metapido-core\lib\library1.jar" kind="lib"></classpathentry>  
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

should be:

<classpath>
  <classpathentry output="target\scala-2.9.1\classes" path="src\main\scala" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\classes" path="src\main\java" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\test-classes" path="src\test\scala" kind="src"></classpathentry>
  <classpathentry output="target\scala-2.9.1\test-classes" path="src\test\java" kind="src"></classpathentry>
  <classpathentry path=".\lib\library1.jar" kind="lib"></classpathentry>  
...

ghost avatar Jul 26 '12 13:07 ghost

Could you please give me access to a reproducible test case?

hseeberger avatar Jul 26 '12 13:07 hseeberger