Hi all,

Mark Hindess asked me to state my case on this list, so here I am: I yesterday filed <https://issues.apache.org/jira/browse/HARMONY-6546>, a request to make the JARs of the Harmony JRE available to a central Maven repository.

Here are my use cases for this: While tons of libraries are available in such repositories (if you don't like Maven, substitute the build management tool of your choice), this is not true of the JRE's; these JARs are simply assumed to exist and are typically not an explicit dependency of your project. Occasionally, however, you need control not of the JRE you run on, but of the one you compile against. Crosscompiling the Scala library (scalac itself ran on OpenJDK when I did the tests) against the Apache Harmony JRE exposed <https://issues.apache.org/jira/browse/HARMONY-6533>, for example. Similarly, a tool like <http://mojo.codehaus.org/animal-sniffer> would benefit from the JRE being available as a managed dependency. Currently, generating a API signature for a JRE different than the one you run on requires a lot of manual steps: <http://mojo.codehaus.org/animal-sniffer-maven-plugin/examples/generating-java-signatures.html>.

In summary, doing tests (which are akin to testing with different compilers in the C/C++ world) to ensure compatibility across JREs is difficult in the Java world; the JARs of *any* JRE are simply not available as a "normal" project dependency. (In fact, you cannot put the rt.jar of Sun's/Oracle's JRE in Maven central due to some click-through license of theirs.)

And here's where the Apache Harmony project could IMHO help out: upload the classlib's JARs to Maven central. As you have already figured the dependencies in your JRE for OSGi, you just need to turn them into Maven POMs. The resulting artifacts would then have coordinates (groupId:artifactId:packaging:classifier:version) like org.apache.harmony:luni:jar:linux-x86:6.0-M2.

Mark wrote HARMONY-6546:
Some of the jars are quite tightly coupled with the portlibrary, vmi, etc. so 
would be difficult/impossible to deploy on a non-Harmony compatible VM.

I'm curious how platform dependent jars - and corresponding native dlls - can be managed in maven repositories.

Platform dependent JARs are not a problem; that's what the classifier dimension of the Maven coordinates is for. Whether you want to deploy the corresponding native DLLs to a Maven repository is a different question, however, as they are not needed for the use cases I outlined above. Furthermore, things like this might be useless on a non-Harmony compatible VM. That's an issue I am well aware of. (I do some Jikes RVM hacking for a PhD. :-) But having the JARs available would still be useful, I think.

Your thoughts?

Best wishes,

Andreas Sewe

Reply via email to