diff --git a/CNAME b/CNAME
new file mode 100644
index 0000000..fccb13d
--- /dev/null
+++ b/CNAME
@@ -0,0 +1 @@
+jruby-gradle.org
diff --git a/asciidoc/cookbook.html b/asciidoc/cookbook.html
new file mode 100644
index 0000000..54bc93f
--- /dev/null
+++ b/asciidoc/cookbook.html
@@ -0,0 +1,638 @@
+
+
+
+
+
+
+
+JRuby Gradle Cookbook
+
+
+
+
+
+
+
+
JRuby Gradle Cookbook
+
+
+
+
Running RSpec
+
+
+
build.gradle
+
+
/* Add the JRuby Gradle "base" plugin as a dependency of our build script */
+buildscript {
+ repositories { jcenter() }
+ dependencies {
+ classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.9'
+ }
+}
+
+/*
+ * Importing the JRubyExec type class so we can create our own JRubyExec-based
+ * task below
+ */
+import com.github.jrubygradle.JRubyExec
+
+dependencies {
+ /* We need RSpec gems from rubygems.org to run RSpec */
+ jrubyExec group: 'rubygems', name: 'rspec', version: '3.1.+'
+}
+
+task spec(type: JRubyExec) {
+ group 'JRuby'
+ description 'Execute the RSpecs in JRuby'
+ jrubyArgs '-S'
+ script 'rspec'
+}
+
+
+
+
+
+
Building an executable .jar file
+
+
+
build.gradle
+
+
buildscript {
+ repositories { mavenLocal() }
+ dependencies {
+ classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.9'
+ }
+}
+plugins {
+ id "com.github.jruby-gradle.jar" version "0.1.2"
+ id "com.github.johnrengelman.shadow" version "1.1.2"
+}
+
+apply plugin: 'java'
+
+dependencies {
+ gems group: 'rubygems', name: 'protobuf', version: '3.0.+'
+ gems group: 'rubygems', name: 'rake', version: '10.3.+'
+}
+
+
+jrubyJavaBootstrap {
+ jruby {
+ initScript = 'bin/rake'
+ }
+}
+
+// Pull the contents of lib and bin into the root of the created jar file
+sourceSets {
+ main {
+ resources.srcDirs = ['lib', 'bin']
+ }
+}
+
+shadowJar {
+ baseName 'blick-agent'
+ exclude '*.sw*', '*.gitkeep', '*.md'
+
+ jruby {
+ // Use the default GEM installation directory
+ defaultGems()
+ defaultMainClass()
+ }
+}
+
+
+
+
+
+
Creating a .war file
+
+
+
build.gradle
+
+
/* Add the JRuby Gradle "war" plugin as a dependency of our build script */
+buildscript {
+ repositories { jcenter() }
+
+ dependencies {
+ classpath 'com.github.jruby-gradle:jruby-gradle-war-plugin:0.1.5'
+ }
+}
+
+apply plugin: 'com.github.jruby-gradle.war'
+
+dependencies {
+ /* Enumerate some dependencies that will get pulled into the .war */
+ gems 'rubygems:colorize:0.7.3'
+ gems 'rubygems:sinatra:1.4.5'
+}
+
+jrubyWar {
+ webInf {
+ /* Include our app inside of `my.war/WEB-INF` */
+ from 'app.rb'
+ /* Include the config.ru to boot the app properly */
+ from 'config.ru'
+ }
+}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/asciidoc/index.html b/asciidoc/index.html
new file mode 100644
index 0000000..e6e3003
--- /dev/null
+++ b/asciidoc/index.html
@@ -0,0 +1,51 @@
+
+
+
+JRuby/Gradle
+
+
+
+
+
+
+
+
+
+
+
+
+This document is a work in progress!
+
+
+
+
+
+
+
+
About
+
+
+
JRuby/Gradle is a collection of
+Gradle plugins which make it easy to build, test,
+manage and package Ruby applications. By compbining the portability of
+JRuby with Gradle’s excellent task and dependency
+management functionality, JRuby/Gradle provides high quality build tooling for
+Ruby and Java developers alike.
+
+
+
+
+
Quick Start
+
+
+
Running some Ruby
+
+
+
+
Packaging some Ruby
+
+
+
+
+
+
diff --git a/asciidoc/latest-news.html b/asciidoc/latest-news.html
new file mode 100644
index 0000000..829950d
--- /dev/null
+++ b/asciidoc/latest-news.html
@@ -0,0 +1,523 @@
+
+
+
+
+
+
+
+Improvements to jar packaging
+
+
+
+
+
+
+
+
+
+
+
Improvements to jar packaging
+
+
+
Hello
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/html5/index.html b/asciidoc/start.html
similarity index 87%
rename from html5/index.html
rename to asciidoc/start.html
index 7127f23..241ccfd 100644
--- a/html5/index.html
+++ b/asciidoc/start.html
@@ -4,13 +4,13 @@
-
-Nope
-
+
+Hello world
+
+
+
JRuby Gradle is a set of
-Gradle plugins which make it easy to build, test,
-manage and package JRuby projects. By relying on Gradle
-to provide much of the basic task and dependency management functionality,
-JRuby Gradle provides high quality build tooling for Ruby and Java developers.
-
-
-
-
-
Quick Start
-
-
-
The most basic use-case might be running some
-RSpec-based tests with JRuby Gradle’s
-base
-plugin.
-
-
-
build.gradle
-
-
/* Add the JRuby Gradle "base" plugin as a dependency of our build script */
-buildscript {
- repositories { jcenter() }
- dependencies {
- classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.9'
- }
-}
-
-/*
- * Importing the JRubyExec type class so we can create our own JRubyExec-based
- * task below
- */
-import com.github.jrubygradle.JRubyExec
-
-dependencies {
- /* We need RSpec gems from rubygems.org to run RSpec */
- jrubyExec group: 'rubygems', name: 'rspec', version: '3.1.+'
-}
-
-task spec(type: JRubyExec) {
- group 'JRuby'
- description 'Execute the RSpecs in JRuby'
- jrubyArgs '-S'
- script 'rspec'
-}
-
-
-
-
Using the build.gradle above, running ./gradlew spec will result in the
-Ruby-based dependencies being resolved and installed, then JRubyExec will
-execute RSpec using JRuby.
-
-
+
-
Note
+
-The version in the above example might be out of date, please refer to the
-release
-page for the latest version of the base plugin.
+This document is a work in progress!
JRuby/Gradle is a collection of
+Gradle plugins which make it easy to build, test,
+manage and package Ruby applications. By compbining the portability of
+JRuby with Gradle’s excellent task and dependency
+management functionality, JRuby/Gradle provides high quality build tooling for
+Ruby and Java developers alike.
-
Plugins
+
Quick Start
-
Base
-
-
The base plugin is the foundation for all of the other plugins. It provides the
-core JRuby dependency, Ruby gem dependency resolution and the
-JRubyExec task type.
The jar plugin helps package .jar files for projects. The plugin supports creating .jar artifacts that are ready to be included in other projects, it also supports creating self-contained executable archives.
Like the Jar plugin, the war plugin helps package .war files for
-projects. Unlike the Jar plugin this plugin is primarily responsible for
-creating JRuby-based web application artifacts. Similar to the Jar however,
-the war plugin can create self-contained executable archives.
script - Object (Usually File or String). Path to the script.
+
```script``` - ```Object``` (Usually File or String). Path to the script.
-
scriptArgs - List. List of arguments to pass to script.
+
```scriptArgs``` - ```List```. List of arguments to pass to script.
-
workingDir - Object (Usually File or String). Working directory for script.
+
```workingDir``` - ```Object``` (Usually File or String). Working directory for script.
-
environment - Map. Environment to be set. Do not set GEM_HOME or GEM_PATH with this method.
+
```environment``` - ```Map```. Environment to be set. Do not set ```GEM_HOME``` or ```GEM_PATH``` with this method.
-
standardInput - InputStream. Set an input stream to be read by the script.
+
```standardInput``` - ```InputStream```. Set an input stream to be read by the script.
-
standardOutput - OutputStream. Capture the output of the script.
+
```standardOutput``` - ```OutputStream```. Capture the output of the script.
-
errorOutput - OutputStream. Capture the error output of the script.
+
```errorOutput``` - ```OutputStream```. Capture the error output of the script.
-
ignoreExitValue - Boolean. Ignore the JVm exit value. Exit values are only effective if the exit value of the Ruby script is correctly communicated back to the JVM.
+
```ignoreExitValue``` - ```Boolean```. Ignore the JVm exit value. Exit values are only effective if the exit value of the Ruby script is correctly communicated back to the JVM.
-
configuration - String. Configuration to copy gems from. (*)
+
```configuration``` - ```String```. Configuration to copy gems from. (*)
-
classpath - List. Additional Jars/Directories to place on classpath.
+
```classpath``` - ```List```. Additional Jars/Directories to place on classpath.
-
jrubyVersion - String. JRuby version to use if not the same as project.jruby.execVersion.
+
```jrubyVersion``` - ```String```. JRuby version to use if not the same as ```project.jruby.execVersion```.
-
gemWorkDir - File. Provide a custom working directory for unpacking GEMs. By default each JRubyExec task
+
```gemWorkDir``` - ```File```. Provide a custom working directory for unpacking GEMs. By default each JRubyExec task
uses it’s own work directory. Use this to set a common work directory for a number of tasks.
-
(*) If jRubyVersion has not been set, jrubyExec will used as
-configuration. However, if jRubyVersion has been set, no gems will be used unless an explicit configuration has been provided
+
(*) If ```jRubyVersion``` has not been set, ```jrubyExec``` will used as
+configuration. However, if ```jRubyVersion``` has been set, no gems will be used unless an explicit configuration has been provided
-
Additional JRubyExec methods for controlling the JVM instance
+
Additional ```JRubyExec``` methods for controlling the JVM instance
@@ -851,7 +722,7 @@ configuration. However, if jRubyVersion has been set,
The version of jruby-complete is strictly tied to the jruby.execVersion. Therefore trying to set jrubyVersion
-in the jrubyexec closure will cause a failure
+in the ```jrubyexec``` closure will cause a failure
GEMs and additional JARs are only taken from the jrubyExec configuration.
@@ -871,7 +742,7 @@ All other methods should work.
-
Running a Ruby PATH command
+
Running a Ruby PATH command
Because JRubyExec checks for the existence of the script, it might look at first whether running Ruby commands from
@@ -881,10 +752,10 @@ All other methods should work.
@@ -907,23 +778,23 @@ All other methods should work.
-
JRubyPrepareGems - A task for unpacking GEMs
+
JRubyPrepareGems - A task for unpacking GEMs
Unpacking occurs using the default jruby version as set by jruby.execVersion.
-
import com.github.jrubygradle.JRubyPrepareGems
+
importcom.github.jrubygradle.JRubyPrepareGems
task unpackMyGems( type : JRubyPrepareGems ) {
- // Parent directory for unpacking GEMs.
- // Gems will end up in a subdirectory 'gems/GemName-GemVersion'
+ // Parent directory for unpacking GEMs.
+ // Gems will end up in a subdirectory 'gems/GemName-GemVersion'
outputDir buildDir
- // Add one or more gems
- // Can be String(s), File(s), FileCollection(s) or Configuration(s)
+ // Add one or more gems
+ // Can be String(s), File(s), FileCollection(s) or Configuration(s)
gems project.configuration.gems
}
There are still plenty of cases, such as for local development, when you might
@@ -980,19 +851,19 @@ for your application:
-
# Hack our GEM_HOME to make sure that the `rubygems` support can find our
-# unpacked gems in build/vendor/
-vendored_gems = File.expand_path(File.dirname(__FILE__) + '/build/vendor')
-if File.exists?(vendored_gems)
- ENV['GEM_HOME'] = vendored_gems
-end
+
# Hack our GEM_HOME to make sure that the `rubygems` support can find our
+# unpacked gems in build/vendor/
+vendored_gems = File.expand_path(File.dirname(__FILE__) + '/build/vendor')
+ifFile.exists?(vendored_gems)
+ ENV['GEM_HOME'] = vendored_gems
+end
-jar_cache = File.expand_path(File.dirname(__FILE__) + '/.jarcache/')
-if File.exists?(jar_cache)
- # Under JRuby `require`ing a `.jar` file will result in it being added to the
- # classpath for easy importing
- Dir["#{jar_cache}/*.jar"].each { |j| require j }
-end
+jar_cache = File.expand_path(File.dirname(__FILE__) + '/.jarcache/')
+ifFile.exists?(jar_cache)
+ # Under JRuby `require`ing a `.jar` file will result in it being added to the
+ # classpath for easy importing
+ Dir["#{jar_cache}/*.jar"].each { |j| require j }
+end
@@ -1002,7 +873,7 @@ level of the source tree, i.e. where build.gradle is located
-
Quickstart for those unfamiliar with Gradle
+
Quickstart for those unfamiliar with Gradle
Note: This assumes you already have [Gradle](http://gradle.org) installed. If you are not on Windows it is recommended
@@ -1010,7 +881,7 @@ that you use [GVM](http://gvmtool.net<
-
% mkdir fancy-webapp
+
% mkdir fancy-webapp
% cd fancy-webapp
% git init
Initialized empty Git repository in /usr/home/tyler/source/github/fancy-webapp/.git/
@@ -1022,7 +893,7 @@ BUILD SUCCESSFUL
Total time: 6.411 secs
% git add gradle gradlew gradlew.bat
-% git commit -m "Initial commit with gradle wrappers"
+% git commit -m "Initial commit with gradle wrappers"
diff --git a/plugins/storm.html b/plugins/storm.html
index f9b5d16..0f8b4a9 100644
--- a/plugins/storm.html
+++ b/plugins/storm.html
@@ -4,630 +4,501 @@
-
+
The Storm Plugin
+
+
+
@@ -647,7 +518,7 @@ storm plugin enables developers to build, test and deploy
-
Note
+
To learn more about Apache Storm itself, please consult
@@ -660,61 +531,12 @@ documentation intends only to cover the JRuby Gradle plugin’s functionalit
-
Working with a basic topology
+
Working with a basic topology
build.gradle
-
buildscript {
- repositories { jcenter() }
- dependencies {
- classpath 'com.github.jruby-gradle:jruby-gradle-storm-plugin:0.1.6+'
- }
-}
-
-apply plugin: 'com.github.jruby-gradle.storm'
-
-/* Need the JRubyStormLocal task to run a "local topology" */
-import com.github.jrubygradle.storm.JRubyStormLocal
-
-dependencies {
- /* Including a Ruby gem dependency for our topology */
- gems 'rubygems:colorize:0.7.3+'
-
- /* Our topology consumes from Kafka so we need our Java dependencies to be
- * enumerated under the `jrubyStorm` configuration so they get properly
- * unpacked into the resulting topology .jar file
- */
- jrubyStorm group: 'org.apache.storm',
- name: 'storm-kafka',
- version: '0.9.2-incubating',
- transitive: false
- jrubyStorm group: 'org.apache.kafka',
- name: 'kafka_2.10',
- version: '0.8.1.+'
-
- /* Excluding Zookeeper because storm-core is already pulling in ZK as
- * dependency to prevent conflicts
- */
- jrubyStorm('org.apache.curator:curator-framework:2+') {
- exclude module: 'zookeeper'
- }
-}
-
-// topologies/ and bolts/ are already included by default, so we just need to
-// add a few more files to the jar file
-jrubyStorm {
- /* Pull our code from lib/ into the root of the topology */
- from 'lib'
- /* Pull the code in config/ into a config/ dir in the topology */
- into('config') { from 'config' }
-}
-
-task runLocal(type: JRubyStormLocal) {
- description 'Run the topology in local topology mode'
- topology 'topologies/basic_topology.rb'
- standardInput System.in
-}
+
Unresolved directive in storm.adoc - include::../examples/basic-topology.gradle[]