Various Lazybones templates

Installation of Lazybones using gvm (Linux, OS/X)

Install gvm:

$ curl -s get.gvmtool.net | bash

Install lazybones:

$ gvm install lazybones

Add the entry "svene/lazybones" to your $HOME/.lazybones/config.groovy file:

bintrayRepositories = [
    "svene/lazybones",
    ...

Installation of Lazybones without gvm

Grab the distribution from Bintray, unpack it to a local directory, and then add its bin directory to your PATH environment variable.

Usage

JavaEE 7 Template

In an arbitrary directory execute lazybones create javaee7 jee7 which will create the folder jee7 and expand the template into it. The folder contains a build.gradle file for the gradle folks and a pom.xml for those who prefer maven. BTW: all the credit goes to Adam Bien of course: https://github.com/AdamBien/javaee7-essentials-archetype

Subtemplate 'jaxrs-sample-registrations'

Installs the 'registrations' JAX-RS example (including Arquillian tests) Adam Bien uses during the Airhacks workshop. The template was created from the following Adam’s maven BCE archetype: http://www.adam-bien.com/roller/abien/entry/java_ee_maven_archetype_bce

Usage: After having executed the javaee7 template change into the new project directory and execute lazybones generate jaxrs-sample-registrations. This will create additional source files for the registrations feature.

Template Development

  • Make a change in a template, e.g. templates/javaee7

  • In top folder execute ./gradlew installTemplateJavaee7 which will install the javaee7 template into ~/.lazybones/templates/javaee7-0.0.5.zip

  • In an arbitrary directory execute lazybones create javaee7 0.0.5 jee7 which will create the folder jee7 and expand the template into it.

  • Repeat the previous steps until you are satisfied with the result

Publishing

  • In the top level folder invoke ./gradlew publishTemplateJavaee7 . Note: the first time a package needs to be created with the bintray Web-GUI (in my case in the 'lazybones' repository) with a name ending in -template (for this example javaee7-template).