aboutsummaryrefslogtreecommitdiffstats
path: root/demo_gradle/README.md
diff options
context:
space:
mode:
authorCesar Andres <cesar.vera-bernal@lucidworks.com>2017-10-21 15:52:17 -0500
committerDecebal Suiu <decebal.suiu@gmail.com>2017-10-21 23:52:17 +0300
commit468abf3490028bbce5cf748d76cc22b73dab2d15 (patch)
tree47c6695bf579388858c789f7d71741247bf4cc18 /demo_gradle/README.md
parent42aaee15591e241add08323c76f4f813867f996b (diff)
downloadpf4j-468abf3490028bbce5cf748d76cc22b73dab2d15.tar.gz
pf4j-468abf3490028bbce5cf748d76cc22b73dab2d15.zip
ISSUE-169: fix gradle demo (#177)
Diffstat (limited to 'demo_gradle/README.md')
-rw-r--r--demo_gradle/README.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/demo_gradle/README.md b/demo_gradle/README.md
new file mode 100644
index 0000000..6851fc0
--- /dev/null
+++ b/demo_gradle/README.md
@@ -0,0 +1,62 @@
+# PF4J Gradle Demo
+
+This demo assumes that you know the basics of Gradle (Please look at [gradle](https://gradle.org/) for more info)
+
+### Setup/Build
+
+1. Clone the repo
+2. Go to demo_gradle `cd demo_gradle`
+3. run `gradle build`
+
+* This will produce one jar, named app-plugin-demo-uberjar.jar, located in the `app/build/libs/` directory and three plugins zips located in `build/plugins` directory.
+* The plugins are `plugin-hello-plugin-0.0.1.zip`, `plugin-KotlinPlugin-1.0.0.zip` and `plugin-welcome-plugin-0.0.1.zip`
+
+### Run the demo
+
+1. Run
+
+```
+ java -jar -Dpf4j.pluginsDir=build/plugins app/build/libs/app-plugin-demo-uberjar.jar
+```
+
+* pf4j.pluginsDir: is where the plugins are located
+
+2. The demo's output should look similar to: (Please see `Boot#main()` for more details)
+```
+demo_gradle $ java -jar -Dpf4j.pluginsDir=build/plugins app/build/libs/app-plugin-demo-uberjar.jar
+[main] INFO org.pf4j.demo.Boot - ########################################
+[main] INFO org.pf4j.demo.Boot - PF4J-DEMO
+[main] INFO org.pf4j.demo.Boot - ########################################
+[main] INFO org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
+[main] INFO org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
+[main] INFO org.pf4j.DefaultPluginManager - PF4J version 0.0.0 in 'deployment' mode
+[main] INFO org.pf4j.AbstractPluginManager - Plugin 'welcome-plugin@0.0.1' resolved
+[main] INFO org.pf4j.AbstractPluginManager - Plugin 'KotlinPlugin@1.0.0' resolved
+[main] INFO org.pf4j.AbstractPluginManager - Plugin 'hello-plugin@0.0.1' resolved
+[main] INFO org.pf4j.AbstractPluginManager - Start plugin 'welcome-plugin@0.0.1'
+[main] INFO org.pf4j.demo.welcome.WelcomePlugin - WelcomePlugin.start()
+[main] INFO org.pf4j.demo.welcome.WelcomePlugin - WELCOMEPLUGIN
+[main] INFO org.pf4j.AbstractPluginManager - Start plugin 'KotlinPlugin@1.0.0'
+[main] INFO org.pf4j.demo.kotlin.KotlinPlugin - KotlinPlugin.start()
+[main] INFO org.pf4j.demo.kotlin.KotlinPlugin - KOTLINPLUGIN
+[main] INFO org.pf4j.AbstractPluginManager - Start plugin 'hello-plugin@0.0.1'
+[main] INFO org.pf4j.demo.hello.HelloPlugin - HelloPlugin.start()
+[main] INFO org.pf4j.demo.Boot - Plugindirectory:
+[main] INFO org.pf4j.demo.Boot - build/plugins
+
+[main] INFO org.pf4j.demo.Boot - Found 3 extensions for extension point 'org.pf4j.demo.api.Greeting'
+[main] INFO org.pf4j.demo.Boot - >>> Whazzup
+[main] INFO org.pf4j.demo.Boot - >>> Welcome
+[main] INFO org.pf4j.demo.Boot - >>> Hello
+[main] INFO org.pf4j.demo.Boot - Extensions added by plugin 'welcome-plugin':
+[main] INFO org.pf4j.demo.Boot - Extensions added by plugin 'KotlinPlugin':
+[main] INFO org.pf4j.demo.Boot - Extensions added by plugin 'hello-plugin':
+[main] INFO org.pf4j.AbstractPluginManager - Stop plugin 'hello-plugin@0.0.1'
+[main] INFO org.pf4j.demo.hello.HelloPlugin - HelloPlugin.stop()
+[main] INFO org.pf4j.AbstractPluginManager - Stop plugin 'KotlinPlugin@1.0.0'
+[main] INFO org.pf4j.demo.kotlin.KotlinPlugin - KotlinPlugin.stop()
+[main] INFO org.pf4j.AbstractPluginManager - Stop plugin 'welcome-plugin@0.0.1'
+[main] INFO org.pf4j.demo.welcome.WelcomePlugin - WelcomePlugin.stop()
+
+```
+