{"id":20885643,"url":"https://github.com/pf4j/pf4j","last_synced_at":"2026-10-19T07:26:28.807Z","repository":{"id":4999236,"uuid":"6157458","full_name":"pf4j/pf4j","owner":"pf4j","description":"Plugin Framework for Java (PF4J)","archived":false,"fork":false,"pushed_at":"2026-10-08T09:41:46.000Z","size":2000,"stargazers_count":2760,"open_issues_count":7,"forks_count":597,"subscribers_count":119,"default_branch":"master","last_synced_at":"2026-10-10T03:28:28.540Z","etag":null,"topics":["java","modularity","plugins"],"latest_commit_sha":null,"homepage":"http://www.pf4j.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yrb/heroku-fontconfig","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pf4j.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"claude":null,"gemini":null,"cursor":null,"copilot":null,"dco":null,"cla":null,"disclosure":null},"funding":{"github":"decebals"}},"created_at":"2012-10-10T13:10:32.000Z","updated_at":"2026-10-08T17:00:28.000Z","dependencies_parsed_at":"2026-09-09T05:35:33.179Z","dependency_job_id":null,"html_url":"https://github.com/pf4j/pf4j","commit_stats":{"total_commits":694,"total_committers":65,"mean_commits":"10.676923076923076","dds":0.2363112391930836,"last_synced_commit":"e3125f2998197d6f866abd1eb77a922103c1cace"},"previous_names":["decebals/pf4j"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/pf4j/pf4j","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pf4j%2Fpf4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pf4j%2Fpf4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pf4j%2Fpf4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pf4j%2Fpf4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pf4j","download_url":"https://codeload.github.com/pf4j/pf4j/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pf4j%2Fpf4j/sbom","scorecard":{"id":415448,"data":{"date":"2025-08-11","repo":{"name":"github.com/pf4j/pf4j","commit":"6db7b38186e7ea302497836af2f1e22c2f896f80"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Code-Review","score":2,"reason":"Found 6/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":3,"reason":"2 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: demo/gradle/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/pf4j/pf4j/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/pf4j/pf4j/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pf4j/pf4j/build.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":10,"reason":"SAST tool detected","details":["Info: SAST configuration detected: Sonar","Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T23:42:32.570Z","repository_id":4999236,"created_at":"2025-08-18T23:42:32.570Z","updated_at":"2025-08-18T23:42:32.570Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38351378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-19T02:00:06.414Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","modularity","plugins"],"created_at":"2024-11-18T08:14:05.471Z","updated_at":"2026-10-19T07:26:28.768Z","avatar_url":"https://github.com/pf4j.png","language":"Java","funding_links":["https://github.com/sponsors/decebals"],"categories":["java","开发框架"],"sub_categories":["Spring Cloud框架"],"readme":"\u003cimg src=\"pf4j-logo.svg\" width=\"250\"/\u003e\n\nPlugin Framework for Java (PF4J)\n=====================\n[![Join the chat at https://gitter.im/decebals/pf4j](https://badges.gitter.im/decebals/pf4j.svg)](https://gitter.im/decebals/pf4j?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![GitHub Actions Status](https://github.com/pf4j/pf4j/actions/workflows/build.yml/badge.svg)](https://github.com/pf4j/pf4j/actions/workflows/build.yml)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=pf4j_pf4j\u0026metric=coverage)](https://sonarcloud.io/summary/overall?id=pf4j_pf4j)\n[![Maven Central](http://img.shields.io/maven-central/v/org.pf4j/pf4j.svg)](http://search.maven.org/#search|ga|1|pf4j)\n\n## Trusted By\n\n- **Netflix Spinnaker** - Continuous delivery platform, its plugin SDK is built on PF4J\n- **Facebook Buck** (Java version) - Build system\n- **Huawei Cloud** - Real-time data processing and scoring systems (MRS - MapReduce Service)\n- **Eclipse Foundation** - Connected Services Platform (ECSP) for automotive software-defined vehicles\n- **Dremio** (now part of SAP) - Data lakehouse platform, with its own plugin manager and class loaders built on PF4J\n- **MuleSoft Anypoint Code Builder** (Salesforce) - Mule DX Runtime loads its IDE component servers as PF4J plugins\n- **Apache Tika** - Content detection and extraction toolkit, uses PF4J for its pipes plugins\n- **Apache BifroMQ** - Distributed MQTT broker, uses PF4J for its auth, throttling and event collector plugins\n- **Appsmith** - Low-code application platform\n- **Nextflow** - Workflow engine, the de facto standard for bioinformatics pipelines\n- **ReportPortal** - Test automation dashboard, with a plugin marketplace built on pf4j-update\n- **Halo CMS** - Modern content management\n- **[More projects...](https://github.com/pf4j/pf4j/discussions/620)**\n\n---\n\nA plugin is a way for a third party to extend the functionality of an application. A plugin implements extension points declared by application or other plugins. Also, a plugin can define extension points.  \n\n**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](https://github.com/pf4j/pf4j/blob/master/demo/gradle/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java) for a real example.  \n\nFeatures/Benefits\n-------------------\nWith PF4J you can easily transform a monolithic java application in a modular application.  \nPF4J is an open source (Apache license) lightweight (around __100 KB__) plugin framework for java, with minimal dependencies (only slf4j-api) and very extensible (see `PluginDescriptorFinder` and `ExtensionFinder`).   \n\n**Why Choose PF4J?**\n- **Enterprise-proven**: Powers Netflix Spinnaker and Facebook Buck\n- **Lightweight**: Only ~100KB with minimal dependencies\n- **Simple**: No XML configuration, pure Java\n- **Alternative to OSGi**: Easy to learn and implement\n\nPractically, PF4J is a microframework that aims to keep the core simple but extensible. PF4J also provides a community-driven ecosystem of extensions.\n\n**No XML, only Java.** You can mark any interface or abstract class as an extension point (with marker interface ExtensionPoint) and you specify that a class is an extension with @Extension annotation.\n\nComponents\n-------------------\n- **Plugin** is the base class for all plugins types. Each plugin is loaded into a separate class loader to avoid conflicts.\n- **PluginManager** is used for all aspects of plugins management (loading, starting, stopping). You can use a built-in implementation as `JarPluginManager`, `ZipPluginManager`, `DefaultPluginManager` (it's a `JarPluginManager` + `ZipPluginManager`) or you can implement a custom plugin manager starting from `AbstractPluginManager` (implement only factory methods).\n- **PluginLoader** loads all information (classes) needed by a plugin.\n- **ExtensionPoint** is a point in the application where custom code can be invoked. It's a java interface marker.   \nAny java interface or abstract class can be marked as an extension point (implements `ExtensionPoint` interface).\n- **Extension** is an implementation of an extension point. It's a java annotation on a class.\n\n**PLUGIN** = a container for **EXTENSION POINTS** and **EXTENSIONS** + lifecycle methods (start, stop, delete)\n\nA **PLUGIN** is similar with a **MODULE** from other systems. If you don't need lifecycle methods (hook methods for start, stop, delete) you are not forced to supply a plugin class (the `PluginClass` property from the plugin descriptor is optional). You only need to supply some description of plugin (id, version, author, ...) for a good tracking (your application wants to know who supplied the extensions or extensions points).\n\nHow to use\n-------------------\nIt's very simple to add pf4j in your application.\n\nDefine an extension point in your application/plugin using **ExtensionPoint** interface marker:\n\n```java\npublic interface Greeting extends ExtensionPoint {\n\n    String getGreeting();\n\n}\n```\n\nCreate an extension using `@Extension` annotation:\n \n```java\n@Extension\npublic class WelcomeGreeting implements Greeting {\n\n    public String getGreeting() {\n        return \"Welcome\";\n    }\n\n}\n```\n\nCreate (it's __optional__) a `Plugin` class if you are interested in plugin's lifecycle events (start, stop, ...):\n\n```java\npublic class WelcomePlugin extends Plugin {\n\n    @Override\n    public void start() {\n        System.out.println(\"WelcomePlugin.start()\");\n    }\n\n    @Override\n    public void stop() {\n        System.out.println(\"WelcomePlugin.stop()\");\n    }\n    \n    @Override\n    public void delete() {\n        System.out.println(\"WelcomePlugin.delete()\");\n    }\n    \n}\n```\n\nIn above code we've created a plugin (welcome) that comes with one extension for the `Greeting` extension point.\n\nYou can distribute your plugin as a jar file (the simple solution). In this case add the plugin's metadata in `MANIFEST.MF` file of jar:\n\n```\nManifest-Version: 1.0\nArchiver-Version: Plexus Archiver\nCreated-By: Apache Maven\nBuilt-By: decebal\nBuild-Jdk: 1.6.0_17\nPlugin-Class: org.pf4j.demo.welcome.WelcomePlugin\nPlugin-Dependencies: x, y, z\nPlugin-Id: welcome-plugin\nPlugin-Provider: Decebal Suiu\nPlugin-Version: 0.0.1\n```\n\nIn the manifest above, we've described a plugin with the id of `welcome-plugin` (mandatory attribute). We've also defined a class `org.pf4j.demo.welcome.WelcomePlugin` (optional attribute), with version `0.0.1` (mandatory attribute) and with dependencies to plugins `x, y, z` (optional attribute).\n\nNow you can play with plugins and extensions in your code:\n\n```java\npublic static void main(String[] args) {\n    ...\n\n    // create the plugin manager\n    PluginManager pluginManager = new JarPluginManager(); // or \"new ZipPluginManager() / new DefaultPluginManager()\"\n    \n    // start and load all plugins of application\n    pluginManager.loadPlugins();\n    pluginManager.startPlugins();\n\n    // retrieve all extensions for \"Greeting\" extension point\n    List\u003cGreeting\u003e greetings = pluginManager.getExtensions(Greeting.class);\n    for (Greeting greeting : greetings) {\n        System.out.println(\"\u003e\u003e\u003e \" + greeting.getGreeting());\n    }\n    \n    // stop and unload all plugins\n    pluginManager.stopPlugins();\n    pluginManager.unloadPlugins();\n    \n    ...\n}\n```\n\nThe output is:\n\n```\n\u003e\u003e\u003e Welcome\n```\n\nPF4J is very customizable and comes with a lot of goodies. Please read the documentation to discover yourself the power of this library.\n\nDocumentation\n---------------\nDocumentation is available on [pf4j.org](http://pf4j.org)\n\nDemo\n---------------\nDemo applications are available in [demo](https://github.com/pf4j/pf4j/tree/master/demo) folder\n\nQuickstart (call to action)\n---------------\n1. Read this file to have an overview about what this project does\n2. Read [Getting started](https://pf4j.org/doc/getting-started.html) section of documentation to understand the basic concepts\n3. Read [Quickstart](https://pf4j.org/dev/quickstart.html) section of documentation to create your first PF4J-based modular application\n\nCredits\n-------\nMany thanks to:\n* [JetBrains](https://www.jetbrains.com) for their free OpenSource license\n* [JProfiler](https://www.ej-technologies.com/jprofiler) for their free OpenSource license","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpf4j%2Fpf4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpf4j%2Fpf4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpf4j%2Fpf4j/lists"}