Skip to content

cmanning09/GuiceDynamicPluginExample

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A guice-based dynamic plugin framework example.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%