-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
13 lines (7 loc) · 896 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
After downloading the source run mvn install on the root pom.xml, then go to the PluginRunner module's target directory and run the created runnable jar:
java -jar guice-dynamic-plugin-example-runner-1.0-SNAPSHOT.jar
This will create a directory adjacent to the runnable jar named "plugins".
Hitting the ENTER key in the console you should see the included plugin print some output to standard out.
Now for the magic
Copy the SamplePlugin (located in the SamplePlugin module's target directory) into the plugins folder (the one created next to the plugin runner executable jar) and hit ENTER in the console again.
Uou should see the new plugin's output along with the included plugin's output. The really cool thing is that guice dependency injection also works for the dynamically loaded plugins, note how both the included and dynamic plugin, share the same singleton dependency instance.