aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2012-11-07 13:40:33 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2012-11-07 13:40:33 +0200
commit07550657ef0412eae460e57439a8fc543b75233f (patch)
tree74a9be272ccd767baaca3dda1b872b5ae0783d85 /README.md
parent363b2b093ccecfc75fd28f49ca2aa139bbc6d1ce (diff)
downloadpf4j-07550657ef0412eae460e57439a8fc543b75233f.tar.gz
pf4j-07550657ef0412eae460e57439a8fc543b75233f.zip
work on plugin dependecy
Diffstat (limited to 'README.md')
-rw-r--r--README.md20
1 files changed, 9 insertions, 11 deletions
diff --git a/README.md b/README.md
index 55430c4..dc4e01e 100644
--- a/README.md
+++ b/README.md
@@ -20,12 +20,6 @@ Artifacts
Using Maven
-------------------
-First you must install the pf4j artifacts in your local maven repository with:
-
- mvn clean install
-
-I will upload these artifacts in maven central repository as soon as possible.
-
In your pom.xml you must define the dependencies to PF4J artifacts with:
```xml
@@ -43,8 +37,8 @@ How to use
It's very simple to add pf4j in your application:
public static void main(String[] args) {
- ...
-
+ ...
+
PluginManager pluginManager = new DefaultPluginManager();
pluginManager.loadPlugins();
pluginManager.startPlugins();
@@ -118,11 +112,15 @@ In above code I supply an extension for the `Greeting` extension point.
You can retrieve all extensions for an extension point with:
- List<ExtensionWrapper<Greeting>> greetings = pluginManager.getExtensions(Greeting.class);
- for (ExtensionWrapper<Greeting> greeting : greetings) {
- System.out.println(">>> " + greeting.getInstance().getGreeting());
+ List<Greeting> greetings = pluginManager.getExtensions(Greeting.class);
+ for (Greeting greeting : greetings) {
+ System.out.println(">>> " + greeting.getGreeting());
}
+The output is:
+
+ >>> Welcome
+ >>> Hello
For more information please see the demo sources.