anchor.diff:  
   === 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.
  +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).
   
   We also provide real life ruby plugins of interest:
  -* The https://github.com/killbill/killbill-cybersource-plugin[Cybersource plugin] is good exmaple to look at to implement a payment plugin (one that implements the https://github.com/killbill/killbill-plugin-api/blob/master/payment/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginApi.java[PaymentPluginApi]) and that relies on the https://github.com/activemerchant/active_merchant[Active Merchant gem].
  -* The https://github.com/killbill/killbill-avatax-plugin[Avalara plugin] is a good example to look at to implement an invoice plugin (one that implements the https://github.com/killbill/killbill-plugin-api/blob/master/invoice/src/main/java/org/killbill/billing/invoice/plugin/api/InvoicePluginApi.java[InvoicePluginApi]).
  -
  +
  +* The https://github.com/killbill/killbill-cybersource-plugin[Cybersource plugin] is good example to look at to implement a payment plugin (one that implements the https://github.com/killbill/killbill-plugin-api/blob/master/payment/src/main/java/org/killbill/billing/payment/plugin/api/PaymentPluginApi.java[PaymentPluginApi]) and that relies on the https://github.com/activemerchant/active_merchant[Active Merchant gem].
  +
  +We also provide a collection of https://github.com/killbill/killbill-plugin-framework-ruby/wiki/Snippets[Ruby Snippets], which shows how to call Kill Bill APIs from Ruby plugins.
   
   = Deployment
   
  
positive.code: # Look for entry under target <artifact_id>-<version>.jar 
  ----
  
  
  == Ruby Plugins
  
  
negative.code: 
  `java` plugins rely on the http://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html[`maven-bundle-plugin`] to produce the correct OSGI plugin (with the correct `MANIFEST.MF`). It is recommened to start from a plugin that already works, as the build configuration can be quite tricky. A good example is to look at the `pom.xml` from the https://github.com/killbill/killbill-hello-world-java-plugin/blob/master/pom.xml[hello world plugin]
  
  The build will produce a `jar` under the `target` directory and this should contain all the classes and configuration files directly accessible for that plugin. OSGI also provides a way to import classes that are exported by other plugins and this is configured in the `Import-Package` section of the `maven-bundle-plugin`. The hello world plugin provides some default based on the https://github.com/killbill/killbill-platform/blob/killbill-platform-0.22/osgi/src/main/java/org/killbill/billing/osgi/config/OSGIConfig.java#L49[classes exported by the system bundle in Kill Bill]. Kill Bill offers a system property, `org.killbill.osgi.system.bundle.export.packages.extra`, to specify additional packages to be exported by the system bundle and that could in turn be imported by the plugin. Desiging which packages are served by the plugin jar and which one are imported from other bundle (and mostly the system bundle inside Kill Bill) is one of the challenges of the OSGI mechanism.
  
  Once the pom is correctly written, building the plugin is straightforward:
  
  