Is javac enough to build an OSGi bundle?
Posted
by Chatanga
on Stack Overflow
See other posts from Stack Overflow
or by Chatanga
Published on 2010-04-25T08:13:56Z
Indexed on
2010/04/25
8:23 UTC
Read the original article
Hit count: 327
To produce a bundle from source using a tool such as javac, you need to provide it with a linear classpath. Unfortunately, it won't work in some situations still perfectly legal from an OSGi point of view:
dependencies with embedded JAR in them;
same packages contained by different dependencies.
Since javac doesn't understand OSGi metadata, I won't be able to simply but the dependencies in a classpath. A finer package grained approach seems necessary.
How this problem is addressed by people using OSGi in an automated process (continuous integration)? Strangely, there is a lot of resources on the web on how to create bundle JAR (creating the metadata, creating the JAR) provided you have the classes/inner JAR to put inside, but very few things on how actually get theses classes compiled.
© Stack Overflow or respective owner