I finally finished moving a part of my application into osgi bundles and use these bundles in my host application. This works really nicely!
At the moment i'm cleaning up my eclipse workspace with bndtools and getting rid of warnings.
One warning i can't get rid of is:
Eclipse: The .classpath contains an unknown container: org.eclipse.jdt.USER_LIBRARY/lombok
I'm using lombok in a few of my bundles. I simply added it to the project properties > java build path > libraries tab. Works great cause lombok is a library for compile time in eclipse. But the problem here is that i do get the above warning.
I added a few external jars (with bundle info) to my local bndtools repository (repositories view) and then the jars can be added to the bndtools build path, for example gson.
But lombok doesn't seem to have any osgi bundle info so adding it to the local repository gives me an error "Jar does not have a symbolic name".
Of course i can edit the lombok.jar and add bundle info. But i was wondering if there is a more cleaner way to do this?
The warning means that while Eclipse knows the jars to put on the compile path due to the lombok container, an offline build, such as gradle, has no way to now what jars to put on the classpath. So the warning indicates a fidelity issue between building in Eclipse and building outside of eclipse.
Putting all the compile jars in the -buildpath
instruction of the project's bnd.bnd
file means fidelity between Eclipse and non-Eclipse building.
However you can remove the warning with the -fixupmessages
instruction in your bnd file.
-fixupmessages: "Eclipse: The .classpath contains an unknown container: org.eclipse.jdt.USER_LIBRARY/lombok"