Are there any Java compilers out there that use the OSGi environment instead of using the classpath?

Are there ways to make javac

use of the existing OSGi framework to resolve build-time dependencies instead of explicitly specifying the classpath? I know I can write an OSGi component that uses the JDK Compiler-API, but I think there should be a simpler solution.

Alternatively, if such an extension is not available for javac

, allows you ejc

to resolve such a thing (can be used from the command line, I would agree to accept the Equinox solution with only ejc

)?

0


a source to share


4 answers


ant task compile with osgi.

http://www.ohloh.net/p/osgijc



or now I think?

http://code.google.com/p/eclipseosgitools/

+3


a source


Have you considered using Maven for dependency management? Plugins are available for IDEs like Eclipse. You just need to map the resource servers and required libraries in the pom.xml, and that's pretty much it.



-Jay

+1


a source


You are missing one obvious Java compiler that follows OSGi rules - Eclipse.

You can use the Eclipse compiler to create a headless assembly, but be careful, this is not for the faint of heart.

Here is a simple tutorial on building with Eclipse and ant.

If you go that route, I suggest looking at Tycho (a Maven subproject for generating OSGi stuff) and Buckminster , an Eclipse project.

+1


a source


I am developing in the Lotus Expeditor Toolkit and the Eclipse Plugin is a free download. My build-time and run-time paths are very easy to manage with entries in the Manifest.

[disclaimer: I am an IBM employee.]

0


a source







All Articles