Converting plain JARs to Java modules
Peter Kriens
peter.kriens at aqute.biz
Wed Nov 9 00:51:24 PST 2011
I have seen Alan's demo of converting poms to Jigsaw modules on JavaOne. I recall that Alan had to fixup most of the poms manually to make this work for Jigsaw? Even after fixing them up, there was no link into the type system or were these dependencies verifiable, you still had to hope that the poms were correct.
The problem is that module dependencies, like poms, introduce an alternate namespace which is fully disconnected from the Java type system. This requires manual maintenance and opens a large space for errors that are impossible with package dependencies.
Package dependencies are directly connected the Java type system and therefore imports can be automatically calculated from the code, creating a chain of verification.
Kind regards,
Peter Kriens
On 8 nov. 2011, at 23:32, 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
mailing list