Skip to content

Extension in dependent jar file for wicket-plugin #4

@jchappelle

Description

@jchappelle

I'm trying to migrate our app to use plugins. It's a large app so I'm doing it in small steps. I've managed to refactor out my plugin portion into a separate project and I've created an api that is shared between the main application and the plugin. For my first step I'd like to not have to alter our deployment process by deploying a separate zip file for the plugin. Instead, I'd like to just have a direct dependency on the plugin jar file.

I noticed the following statement on the PF4J project README:

NOTE: Starting with version 0.9 you can define an extension directly in the application jar (you're not obligated to put the extension in a plugin - you can see this extension as a default/system extension). See WhazzupGreeting for a real example.

Is this supported for the wicket plugin? My plugin class never gets instantiated therefore my Extensions never get injected.

If this is supported, then are there any tricks like a custom PluginManager that I have to create? I noticed the DefaultPluginManager looks like it is expecting to read from a File. Should I use ServiceLoader in this scenario? I noticed the WhazzupGreeting uses @extension but the HowdyGreeting uses ServiceLoader.

I'm using the 0.5.0-SNAPSHOT.

Thanks.

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