softprops/ls — Issue #2: NoClassDefFoundError error when testing plugin through publish-local
Author: n8han
Created: 2011-11-03 16:27:42+00:00
State: open

```
ls@0.1.0-SNAPSHOT > ls-find unf
[error] {file:/home/nathan/Programming/ls/}ls/*:ls-find: java.lang.NoClassDefFoundError: ls/LibraryVersions
[error] Total time: 0 s, completed Nov 3, 2011 9:08:56 AM
```

This happens whether the plugin is added globally or to a single project. Confirmed on two separate Ubuntu 11.10 installations, cleaned out the ivy cache and various other things many times only to reach the same error.

However, when I configured as ProjectRef dependency to a local directory, it worked immediately. I wonder if this is the only way ls has been tested, so far? If you are unable to replicate, perhaps you can tell me which sbt command will print out the classpath that sbt is using when failing to find the the ls.LibraryVersions class. Then I can see what ls jar it's looking at, and peek inside to see if the class is there or not.

In any case, this makes me wonder if a git dependency is actually more stable than using a maven dependency, considering all the problems with resolution and corrupted caches that we are having lately. I tried this initially with posterous-sbt, but went with the binary maven dependencies as those seemed to be recommended. Now I'm inclined to revisit that. The other benefit is tat people can use it for versions of sbt you have not published artifacts for, such as prerelease versions. Of course, they can do that anyway, but it's easier if that is just how it always works.