musk / SbtEclipsify

Sbt plugin for creating eclipse project and classpath files for sbt projects [DEPRECATED]
BSD 3-Clause "New" or "Revised" License
74 stars 9 forks source link

Attribute sourcepath in .classpath contains wrong path #9

Closed marcingurbisz closed 13 years ago

marcingurbisz commented 13 years ago

I use multiprojects within one project as desribed in http://code.google.com/p/simple-build-tool/wiki/SubProjects. Attribute sourcepath in .classpath contains wrong path after being generated by SbtEclipsify. For example:

instead:

marcingurbisz commented 13 years ago

Sorry. Example should be:

<classpathentry kind="lib" path="lib_managed/scala_2.8.1/test/lift-json_2.8.1-2.3-M1.jar" sourcepath="./webapp/lib_managed/scala_2.8.1/compile/lift-json_2.8.1-2.3-M1-sources.jar" />

Instead:

<classpathentry kind="lib" path="lib_managed/scala_2.8.1/test/lift-json_2.8.1-2.3-M1.jar" sourcepath="lib_managed/scala_2.8.1/compile/lift-json_2.8.1-2.3-M1-sources.jar" />

musk commented 13 years ago

Is the project with the wrong sourcepath a webproject?

marcingurbisz commented 13 years ago

Yes it is (extends DefaultWebProject(info))

musk commented 13 years ago

Then I'm guessing it is a problem with the way webprojects create their classpath. I will take a look at it as soon as I find some time. If you have a patch could you fork and send me a pull request? Cause I do not know when I will be able to take a stab at this.

marcingurbisz commented 13 years ago

I don't think that the problem is specific to web project. The same problem I have with AndroidProject. I just shortly looked at the source code and I think the problem is that findSource(basePath, path) in ClasspathFile.scala returns paths relative to parent project and not subprojects. Since I don't not have time to dig into this problem in plugin I use a workaround with postprocessing of .classpath files for now.

musk commented 13 years ago

do you have an example project that I can use to debug this?

marcingurbisz commented 13 years ago

Yes I have. Where should I put it?

On Mon, Mar 14, 2011 at 3:48 PM, musk reply@reply.github.com wrote:

do you have an example project that I can use to debug this?

https://github.com/musk/SbtEclipsify/issues/9#comment_869175

marcingurbisz commented 13 years ago

I have sent the project on your email

marcingurbisz commented 13 years ago

I have sent the project on your email

musk commented 13 years ago

I got the mail. Will have a look at it asap