The Vaandroid Gradle Plugin provides tools for the creation of Vaandroid Cloud Servers for testing and production.

Overview

Vaandroid Cloud Server is a self contained application that lets you view your Vaandroid applications in a web browser. By default the plugin will install a server in your project build directory and deploy your Vaandroid application plugins into it.

If you have multiple Vaandroid projects, you can put the server in a common location and specify it before applying the gradle plugin.

The defaul server URL is https://localhost:8444. This can be changed via the Karaf http service settings or the plugin configuration block.

Tasks

vaandroid-server group

deployServeAndBrowse
Deploys the application, starts the server, and opens a browser window.
createServer
Creates a Vaandroid server using the specified configuration.
launchServer
Starts a Vaandroid server in a new terminal. The server runs in debug mode on port 5005 by default.
browseServer
Opens a browser on the Vaandroid server
launchServerAndBrowse
Starts a Vaandroid server, waits for it to be ready, and then opens a browser.
cleanServer
Removes the server, but keeps the deploy directory intact.
waitForServer
Waits for the Vaandroid server to be ready by polling every 5 seconds.

Dependencies

If you use deploy instead of compile, your dependencies will be copied into the deploy directory when you build the server.

dependencies {
  compile 'your_bundle'
  deploy 'your_bundle'
}

Configuration

vaandroidServer {

// The HTTP port to listen on
httpPort = 8181

// The HTTPS port to listen on
httpsPort = 8443

// Bundles and features to be copied into the deploy directory.  Items can be a PaxURL or a File.  Items must be valid bundles or features.
deploy = [ ]

// Bundles to be installed on first boot.  Items must be a valid PaxURL.  The wrap protocol can be used (wrap:mvn:foo/bar/1.0)
install = [ ]

// Karaf features to be installed on first boot.
features = [ ]

// OSGI imports.  Default is ['*']. Each string item in the list can contain multiple items by using a comma.  See [http://bnd.bndtools.org/heads/import_package.html] for info.
imports = [ ]

// OSGI exports.  Default is ['*']. Each string item in the list can contain multiple items by using a comma.  See [http://bnd.bndtools.org/heads/export_package.html] for info.
exports = [ ]

}
imports = [ 'a', 'b', 'c' ]
imports = [ 'a, b, c' ] // same as previous example
todo: add enable/disable debug on launch parameter