Closed paulbakker closed 9 years ago
Hi Paul;
In the old org.apache.felix.dependencymanager.annotation-3.1.1-SNAPSHOT.jar, the DM annotations plugin was using a class extending the aQute.lib.osgi.ClassDataCollector, but this class was overriding the "classBegin(int access, String name)", which is probably not available anymore in the latest bndlib (not sure, it's a supposition).
Now, in the latest "org.apache.felix.dependencymanager.annotation-3.2.0" version, I have fixed this class in order to override the "void classBegin(int access, TypeRef name)" method instead of the "void classBegin(int access, String name")" method.
So, can you please redo the test with the latest "org.apache.felix.dependencymanager.annotation-3.2.0" release ?
/Pierre
Changing the path to the plugin to a absolute path fixes the problem. Still this is a potentially breaking change, which I can't explain yet.
@pderop Same problem with 3.2.0, but when using an absolute path 3.2.0 works well also.
it seems that I also reproduce the problem: I just compiled the latest bndtools, and installed it in Eclipse Juno.
I'm using the following bndtools test:
/tmp/myproject/cnf/... /tmp/myproject/test/...
I then copied the dm annotation plugin in /tmp/myproject/cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dm.annotation-3.2.0.jar
and in /tmp/myproject/test/bnd.bnd bundle, I'm then using:
-plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPluginpath:=cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dm.annotation-3.2.0.jar
then bndtools is getting a ClassNotFoundException and can't load the plugin:
Failed to load plugin org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;path:="cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dependencymanager.annotation-3.2.0.jar", error: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin not found, parent: org.eclipse.osgi.internal.loader.EquinoxClassLoader@60323f[biz.aQute.bndlib:2.4.0.201408302104(id=424)] urls:[file:/tmp/myproject/test/cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dependencymanager.annotation-3.2.0.jar, file:/tmp/myproject/cnf/plugins/biz.aQute.repository/biz.aQute.repository-2.1.0.jar] exception:java.lang.ClassNotFoundException: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin bnd.bnd /test Unknown Bndtools Problem Marker
In the above error, you can see that the classpath URL seems invalid (because the cnf dir is located in /tmp/myproject/ directory, and not in /tmp/myproject/test/
->
urls:[file:/tmp/myproject/test/cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dependencymanager.annotation-3.2.0.jar
Prefixing the plugin with "${workspace}" is then fixing the problem:
-plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPluginpath:=${workspace}/cnf/plugins/org.apache.felix.dependencymanager.annotation-3.2.0/org.apache.felix.dm.annotation-3.2.0.jar
I want to close this one, this should have been an absolute path name from the beginning. We could add this to the release notes though?
I have several workspaces with the Felix Dependency Manager Annotations plugin installed. In is configured in build.bnd:
With the latest bndtools build this doesn't work any more. The error log shows the following:
An internal error occurred during: "Building workspace".
It looks like a Gradle build still works, so I'm expecting the problem is in Bndtools, not bnd.