jruby-gradle-storm-plugin/README.adoc

60 lines
1.7 KiB
Plaintext
Raw Normal View History

= JRuby/Gradle Storm Plugin
2014-09-16 22:03:56 +00:00
2015-08-18 20:11:51 +00:00
image:https://travis-ci.org/jruby-gradle/jruby-gradle-storm-plugin.svg?branch=master["Build Status", link="https://travis-ci.org/jruby-gradle/jruby-gradle-storm-plugin"]
image::https://api.bintray.com/packages/jruby-gradle/plugins/jruby-gradle-storm-plugin/images/download.svg[link="https://bintray.com/jruby-gradle/plugins/jruby-gradle-storm-plugin/_latestVersion"]
JRuby/Gradle plugin to manage creating Storm topology jars
== Usage
2014-10-23 17:34:42 +00:00
**NOTE:** This plugin is stili in a very early stages.
Including the plugin:
[source, groovy]
----
2014-10-23 17:34:42 +00:00
buildscript {
repositories { jcenter() }
dependencies {
classpath "com.github.jruby-gradle:jruby-gradle-storm-plugin:0.2.0"
2014-10-23 17:34:42 +00:00
}
}
----
2014-10-23 17:34:42 +00:00
== Running a "local topology"
2014-10-23 17:34:42 +00:00
The `JRubyStormLocal` task provides the underlying machinery to run a
link:https://github.com/jruby-gradle/redstorm[Redstorm] topology in "local"
mode:
2014-10-23 17:34:42 +00:00
[source, groovy]
----
2014-10-23 17:34:42 +00:00
import com.github.jrubygradle.storm.JRubyStormLocal
task runLocalTopology(type: JRubyStormLocal) {
// path is considered relative to the working directory
// the task is executed in
topology 'topologies/example_topology.rb'
}
----
2014-10-23 17:34:42 +00:00
Then you can run the local topology with: `./gradlew runLocalTopology`
NOTE: The Gradle script will block until the local topology is terminated (Ctrl+C)
2014-10-23 17:34:42 +00:00
== Creating a topolog .jar
2014-10-23 17:34:42 +00:00
Creating a topology `.jar` file is useflu when you plan on uploading your
topology to a running Storm cluster. *Currently* this plugin will only create
that jar for you, it will not upload it.
By default the plugin will include `bolts/` and `/topologies/` in the generated
`.jar` file.
* `./gradlew jrubyStorm` will create a `.jar` in `build/libs/`