Plugin gets stuck

While working on a new plugin I tried to reuse components, that already exist.
While testing the plugin froze. You could see it in the debug view by stepping to the reused component. There where no exceptions that tell you anything. Suddenly I had the idea that in the eclipse environment that I started to test the plugin might have something in the error log. Bingo: NoClassDefFoundException. But how could the plugin compile if the resource is not available? The answer is quite simple: I added the needed resource file to the buildpath instead to the plugin dependencies. Therefore at compile time the resource could be found but the plugin knew nothing of the needed resource. When building a plugin never add something needed to the buildpath, add it to the dependencies. Doing this the plugin worked as desired

Schreibe einen Kommentar