Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JarPluginManager, PluginLoader, AbstractPluginManager #128

Merged
merged 1 commit into from Feb 26, 2017

Conversation

decebals
Copy link
Member

This PR comes with many good things.
First of all, it comes with a builtin JarPluginManager (see #118). According javadoc:

It's a {@link PluginManager} that load plugin from a jar file.
Actually, a plugin is a fat jar, a jar which contains classes from all the libraries,
on which your project depends and, of course, the classes of current project.

So, your plugins are jar files that could be created using Maven Shade Plugin.

To add the possibility to create custom PluginManager more easy, this PR introduces new concepts:

  • AbstractPluginManager
  • PluginLoader

The current implementation of JarPluginManager is:

public class JarPluginManager extends DefaultPluginManager {

    @Override
    protected PluginRepository createPluginRepository() {
        return new JarPluginRepository(getPluginsRoot(), isDevelopment());
    }

    @Override
    protected PluginDescriptorFinder createPluginDescriptorFinder() {
        return isDevelopment() ? new PropertiesPluginDescriptorFinder() : new JarPluginDescriptorFinder();
    }

    @Override
    protected PluginLoader createPluginLoader() {
        return new JarPluginLoader(this, pluginClasspath);
    }

}

@coveralls
Copy link

coveralls commented Feb 22, 2017

Coverage Status

Coverage increased (+1.8%) to 15.176% when pulling d7f245e on jar_plugin_manager into c82df37 on master.

@decebals decebals mentioned this pull request Feb 24, 2017
@decebals decebals merged commit 002f1e3 into master Feb 26, 2017
@decebals decebals deleted the jar_plugin_manager branch March 3, 2017 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants