Migration from pf4j-update
If you’re currently using pf4j-update, migrating to Plugwerk is straightforward.
Step 1: Add the SDK
Section titled “Step 1: Add the SDK”See Installation for dependency coordinates.
Step 2: Replace UpdateManager with Plugwerk Extensions
Section titled “Step 2: Replace UpdateManager with Plugwerk Extensions”Replace your pf4j-update UpdateManager with the Plugwerk extension points:
// Before (pf4j-update)var repo = new DefaultUpdateRepository( "my-repo", new URL("https://example.com/plugins.json"));var updateManager = new UpdateManager( pluginManager, List.of(repo));var updates = updateManager.getUpdates();
// After (Plugwerk)var config = new PlugwerkConfig.Builder( "https://myplugwerk.host", "acme-corp") .apiKey("pwk_...") .build();
var marketplace = pluginManager .getExtensions(PlugwerkMarketplace.class) .getFirst();
// Check for updatesvar installed = Map.of("my-plugin", "1.0.0");var updates = marketplace.updateChecker() .checkForUpdates(installed);
// Install an updatevar result = marketplace.installer() .install("my-plugin", "2.0.0");// Before (pf4j-update)val repo = DefaultUpdateRepository( "my-repo", URL("https://example.com/plugins.json"))val updateManager = UpdateManager(pluginManager, listOf(repo))val updates = updateManager.updates
// After (Plugwerk)val config = PlugwerkConfig.Builder( "https://myplugwerk.host", "acme-corp") .apiKey("pwk_...") .build()
val marketplace = pluginManager .getExtensions(PlugwerkMarketplace::class.java) .first()
// Check for updatesval installed = mapOf("my-plugin" to "1.0.0")val updates = marketplace.updateChecker() .checkForUpdates(installed)
// Install an updateval result = marketplace.installer() .install("my-plugin", "2.0.0")Step 3: Use the Full SDK (Optional)
Section titled “Step 3: Use the Full SDK (Optional)”Beyond update checking, the Plugwerk SDK offers catalog browsing and search. See the Configuration guide for details.
plugins.json Endpoint
Section titled “plugins.json Endpoint”Plugwerk serves a plugins.json endpoint that returns the catalog in a format inspired by pf4j-update. This can be useful for read-only tooling that consumes plugin feeds, but it is not intended as a drop-in for UpdateRepository.