anchor.diff:  mvn clean install
   # Look for entry under target <artifact_id>-<version>.jar
   ----
  +
  +==== Deployment
  +
  +After the plugin was built, one can deploy the plugin using the `kpm` command. The steps provided below assume Kill Bill is running inside a docker container and specify the steps that occur outside and inside the container:
  +
  +[source,bash]
  +----
  +
  +# Copy the Jar inside the container
  +> docker cp target/hello-world-plugin-1.0.1-SNAPSHOT.jar kb_killbill_1:/tmp
  +
  +# SSH inside the conatainer
  +> docker exec -ti kb_killbill_1 bash
  +
  +# Install the plugin : '/var/lib/killbill/bundles' is the default in our Kill Bill docker images
  +tomcat@6e7d5ae5bfc4> kpm install_java_plugin 'dev:hello' --from-source-file=/tmp/hello-world-plugin-1.0.1-SNAPSHOT.jar  --destination=/var/lib/killbill/bundles
  +
  +# exit
  +tomcat@6e7d5ae5bfc4> ^D
  +
  +# Restart Kill Bill core
  +> docker restart kb_killbill_1
  +----
  +
  +Note that the last step that restarts the container -- and therefore Kill Bill core -- is required to make the newly installed plugin visible. KPM only allows to install the plugin on the filesystem and until Kill Bill core gets restarted this plugin is unknown to the system. However, once the plugin has been installed once, iterating through development becomes easier because all is needed is to copy the jar at the right location and restart the plugin -- restarting Kill Bill core is not even necessary anymore -- as illustrated below:
  +
  +[source,bash]
  +----
  +# Override the existing jar
  +> docker cp target/hello-world-plugin-1.0.1-SNAPSHOT.jar kb_killbill_1:/var/lib/killbill/bundles/plugins/java/1.0.1-SNAPSHOT/hello-world-plugin-1.0.1-SNAPSHOT.jar 
  +
  +# Restart the plugin
  +> curl -v \
  +-u admin:password \
  +-H "Content-Type: application/json" \
  +-H 'X-Killbill-CreatedBy: admin' \
  +-X POST \
  +--data-binary '{
  +    "nodeCommandProperties": [
  +        {
  +            "key": "pluginKey",
  +            "value": "hdev:hello"
  +        }
  +    ],
  +    "nodeCommandType": "RESTART_PLUGIN",
  +    "isSystemCommandType": true
  +}' \
  +"http://127.0.0.1:8080/1.0/kb/nodesInfo"
  +
  +# Follow console traces and verify things are in good order
  +> curl -v \
  +-u admin:password \
  +http://127.0.0.1:8080/1.0/kb/nodesInfo | python -m json.tool
  +
  +----
  +
  +Note that when using OSS released plugins, the steps are simpler because the plugin can be installed directly using our http://docs.killbill.io/0.20/plugin_management.html#_installation[plugin management apis] and don't require mucking around with copying jars and restarting Kill Bill core.
  +
   
   ==== Examples of Java Plugins
   
  
positive.code: 
  It is recommened to clone some of our existing plugins to get started. For `java`, the https://github.com/killbill/killbill-hello-world-java-plugin[hello world plugin] is a good starting point. For `ruby`, we also provide a https://github.com/killbill/killbill-hello-world-ruby-plugin[hello world plugin]. Depending on the type of plugin to be built, there may be a better example to look at (e.g. look at an existing payment plugin if you are building a new gateway integration).
  
  We provide two plugin frameworks that can be used to implement some of the work that plugins need to do:
  
  * https://github.com/killbill/killbill-plugin-framework-java[`java plugin framework`]
  * https://github.com/killbill/killbill-plugin-framework-ruby[`ruby plugin framework`]
  
negative.code: bundle exec rake killbill:package
  ----
  
  ==== Deployment
  
  The steps are very similar to the one provided in the java section above, except for the fact that in ruby we are not deploying a jar but the package (`tar.gz`). Assuming a modified version of our stripe plugin was built:
  
  [source,bash]
  ----
  # Copy the tar.gz 
  > docker cp pkg/killbill-stripe-5.0.0-dev.tar.gz  kb_killbill_1:/tmp
  
  # SSH inside the conatainer
  > docker exec -ti kb_killbill_1 bash
  
  # Install the plugin : '/var/lib/killbill/bundles' is the default in our Kill Bill docker images
  tomcat@6e7d5ae5bfc4> kpm install_ruby_plugin 'dev:stripe' --from-source-file="/tmp/killbill-stripe-5.0.0-dev.tar.gz"  --destination=/var/lib/killbill/bundles
  
  # exit
  tomcat@6e7d5ae5bfc4> ^D
  
  # Restart Kill Bill core
  > docker restart kb_killbill_1
  
  ----
  
  
  ==== Examples of Ruby Plugins
  
  We provide a https://github.com/killbill/killbill-hello-world-ruby-plugin[hello world] ruby plugin that can be used as starting point. Make sure to correctly update the `*.gemspec` and the `pom.xml` to correctly reflect the gem name, and maven coordinates of your plugin (if you decide to publish your plugin to Nexus).
  