forax at univ-mlv.fr
Thu Apr 6 08:09:19 UTC 2017
Here is the code (for my build tool, not Maven):
It does static analysis to find the requires and export, open the META-INF/services to add provides and looks for ServiceLoader.load to add uses (doing a flow analysis of the class constants).
You still need to add few additional requires because of Class.forName, but most of the grunt works is done automatically.
----- Mail original -----
> De: "Brian Fox" <brianf at infinity.nu>
> À: "jpms-spec-observers" <jpms-spec-observers at openjdk.java.net>
> Cc: jpms-spec-experts at openjdk.java.net
> Envoyé: Mercredi 5 Avril 2017 19:22:09
> Objet: Re: Proposal: #AutomaticModuleNames
> On Wed, Apr 5, 2017 at 1:32 AM, David M. Lloyd <david.lloyd at redhat.com>
>> I think rather what we'll end up with in the end is that non-trivial
>> application builders who want to use Jigsaw will rely almost exclusively on
>> build tooling to generate or regenerate "real" descriptors "safely" for
>> their application distributions,
> I totally agree. The next big popular maven plugin will be the
> maven-fix-automodule-hell-plugin due to user demand that without any other
> hooks in place will have to resort to modifying 3rd party dependencies to
> unwind otherwise messed up default names. It blows my mind that we keep
> coming back to the filename as the best default despite all the
> alternatives that have been proposed.
More information about the jpms-spec-experts