Skip to content

Fails to recognize external extensions #64

Description

@tnyblom

I have an issue with external plugins.
They all load but fails to get recognized as plugins extending the correct extension point.

I took the demo project and extended it with one more plugin that is loaded from a .zip file. But when I did this I always get this error:

DEBUG ro.fortsoft.pf4j.DefaultExtensionFinder - 'test.pf4j.main.Greeting' is not assignable from extension point 'test.pf4j.plugins.CheersPlugin$WelcomeGreeting'

The exact same code works if I just move it into the same jar file as the main program.

Interface:

public interface Greeting extends ExtensionPoint {
    public String getGreeting();
}

Plugin:

public class CheersPlugin extends Plugin {
    public CheersPlugin(PluginWrapper wrapper) {
        super(wrapper);
    }

    @Extension
    public static class WelcomeGreeting implements Greeting {
        @Override
        public String getGreeting() {
            return "Cheers from outside";
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions