Skip to content

Instantly share code, notes, and snippets.

@jetztgradnet
Created December 15, 2010 23:40
Show Gist options
  • Save jetztgradnet/742786 to your computer and use it in GitHub Desktop.
Save jetztgradnet/742786 to your computer and use it in GitHub Desktop.
Run an OSGi framework using the Groovy DSL provided by the groovyx.osgi.runtime module
import grooxy.osgi.runtime.OsgiRuntimeBuilder
OsgiRuntimeBuilder.run {
framework 'equinox'
bundle 'mvn:org.apache.felix:org.apache.felix.configadmin:1.2.4'
bundle 'mvn:org.apache.felix:org.apache.felix.fileinstall:3.0.2'
console(8023)
doRun = {
// wait one minute
println "stopping OSGi runtime after one minute"
Thread.sleep 60000
}
afterStop = {
println "stopped OSGi runtime"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment