[![Maven Central](http://img.shields.io/maven-central/v/org.pf4j/pf4j.svg)](http://search.maven.org/#search|ga|1|pf4j)
A 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.
+declared by application or other plugins. Also, a plugin can define extension points.
**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/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java) for a real example.
With PF4J you can easily transform a monolithic java application in a modular application.
PF4J 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`).
-Practically PF4J is a microframework and the aim is to keep the core simple but extensible. I try to create a little ecosystem (extensions) based on this core with the help of the comunity.
+Practically PF4J is a microframework and the aim is to keep the core simple but extensible. I try to create a little ecosystem (extensions) based on this core with the help of the community.
For now are available these extensions:
- [pf4j-update](https://github.com/pf4j/pf4j-update) (update mechanism for PF4J)
- [pf4j-spring](https://github.com/pf4j/pf4j-spring) (PF4J - Spring Framework integration)
}
```
-Create (it's __optional__) a `Plugin` class if you are interested for plugin's lifecycle events (start, stop, ...):
+Create (it's __optional__) a `Plugin` class if you are interested in plugin's lifecycle events (start, stop, ...):
```java
public class WelcomePlugin extends Plugin {
- public WelcomePlugin(PluginWrapper wrapper) {
- super(wrapper);
-
- // you can use "wrapper" to have access to the plugin context (plugin manager, descriptor, ...)
- }
-
@Override
public void start() {
System.out.println("WelcomePlugin.start()");
In above code I created a plugin (welcome) that comes with one extension for the `Greeting` extension point.
-You can distribute you plugin as a jar file (the simple solution). In this case add the plugin's metadata in `MANIFEST.MF` file of jar:
+You 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:
```
Manifest-Version: 1.0