Skip to content
/ pf4j-jpms Public

PF4J - JPMS (Java Platform Module System) integration

Notifications You must be signed in to change notification settings

pf4j/pf4j-jpms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

PF4J - JPMS integration

This project is a proof of concept related to how you can integrate PF4J with Java Platform Modules System that comes with Java 9.

Features/Benefits

What I think/feel that are possible:

  • a Module from JPMS is equivalent with a Plugin from PF4J
  • read plugin metadata from module-info.java (module-info.class), that means to write a custom PluginDescriptorFinder
  • read extensions-points and extensions from module-info.java, that means to write a custom ExtensionFinder

When required, PF4J can be forced to use a single class loader for all plugins (the default is to use a class loader for each plugin) via DefaultPluginLoader.createPluginClassLoader(Path pluginPath, PluginDescriptor pluginDescriptor) (returns the same instance).

TODO: add other ideas

PF4J vs JPMS (conceptual)

  • In JPMS, the syntax for indicating dependency in a module is asymmetric - you export a package, but require a module.
  • In JPMS you export only some packages from a module.

Possible issues

  • PF4J uses SemVer but JPMS not. A possible solution is to abstract the work with versions in a VersionManager (interface) and to have the possibility to inject a custom version manager in PluginManager. Resolved by pf4j/pf4j#155.
  • find a resource

Resources

About

PF4J - JPMS (Java Platform Module System) integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published