Reputation: 7749
Are there any ways to make javac
use an existing OSGi-environment for the resolution of build-time dependencies instead of setting the classpath explicitely? I know I could write an OSGi-component that uses the Compiler-API of the JDK, but I think there should be a more straightforward solution.
Alternatively, if no such extension is available for javac
, does ejc
allow such a thing (usable from the command line; I'd be willing to accept an Equinox-only solution with ejc
)?
Upvotes: 0
Views: 857
Reputation: 5405
You're missing out on the one obvious Java compiler that follows OSGi rules - Eclipse.
You can use Eclipse's compiler to do a headless build, but be warned, it's not for the faint-hearted.
Here's a simple tutorial on building with Eclipse and ant.
If you go down this path, I'd suggest looking at Tycho (the Maven sub-project for building OSGi stuff) and Buckminster, an Eclipse project.
Upvotes: 1
Reputation: 717
ant task to compile using osgi.
or here now I guess?
http://code.google.com/p/eclipseosgitools/
Upvotes: 3
Reputation: 55907
I'm developing in the Lotus Expeditor Toolkit and Eclipse Plugin - It's a no-charge download. My build time and runtime classpaths are managed very easily by entries in the Manifests.
[disclaimer: I am an IBM employee.]
Upvotes: 0