Skip to content

Error updating plugin because file already in use #39

@hazemkmammu

Description

@hazemkmammu

I tried running the example in the 'How to use' section of README.md. The update manager failed to update the plugin to the latest version because it could not delete the old version. The old version was already loaded and started before the update call.

So I unloaded the plugin being updated before calling update. This threw an exception "Plugin {} cannot be updated since it is not installed" because the plugin was unloaded. The method org.pf4j.update.UpdateManager.updatePlugin(String, String) is checking pluginManager.getPlugin(id) == null, shouldn't it instead check if the Jar/Zip exists in the pluginRoot directory. It is installed, it's just not loaded.

Right now it seems impossible to update a plugin using the default update manager.

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