Converting plain JARs to Java modules
gnormington at vmware.com
Wed Nov 9 01:06:28 PST 2011
Those points of unreliability of Maven POMs and the locality of the conversion are strong arguments in favour of support for package-level dependencies and a JAR->module converter generating such dependencies. The only downside I am aware of is that a fully automatic tool needs to leave the package import version ranges wide open as it can't guess the correct versions needed. I think this is acceptable for a fully automatic conversion.
On 8 Nov 2011, at 23:15, Sangjin Lee wrote:
> Translating maven POMs into module dependency information is not quite the same as generating it based on the bytecode in my view. We're well too aware that most of the POMs do not contain correct (direct) dependencies for this to be accurate. The generated module dependency information would be as good as the underlying POMs, which is generally not so good.
> Generating OSGi manifests using package-level dependencies can be very accurate, and does not depend much on user input. Furthermore, it is a local operation.
> On Tue, Nov 8, 2011 at 2:32 PM, <mark.reinhold at oracle.com> wrote:
> 2011/11/7 1:47 -0800, gnormington at vmware.com:
> > ...
> > In case it's not obvious, please note that support for package level
> > dependencies would permit a fully automatic conversion because it would
> > then not be necessary to know the module name corresponding to each
> > package dependency.
> Yes, I think we understand that.
> > A fully automatic converstion could be particularly
> > useful in automatically serving up modularised versions of existing
> > JARs, e.g. in a front end to Maven central.
> Maven POMs already contain what is, essentially, module-level dependence
> information, so the value of package-level dependences for that case is
> far from clear. Alan has prototyped a tool which constructs a Jigsaw
> module declaration from a POM; it works well, at least for simple cases,
> though there does seem to be a lot of noise in the POMs published on
> Maven Central.
> - Mark
More information about the jigsaw-dev