Skip to content

Instantly share code, notes, and snippets.

@sebastienblanc
Last active December 18, 2015 02:39
Show Gist options
  • Save sebastienblanc/5712602 to your computer and use it in GitHub Desktop.
Save sebastienblanc/5712602 to your computer and use it in GitHub Desktop.

Environment Setup

Forge

  • Download Forge 1.3.0.Final http://forge.jboss.org/index.html

  • Unpack Forge

  • Start the forge forge console and install the Aerogear Scaffold plugin : forge git-plugin git://github.com/aerogear/aerogear-forge-scaffold

AeroGear Controller

The Scaffold plugin depends on a version which is not yet available on the maven repos.

  • Clone Aerogear Controller https://github.com/aerogear/aerogear-controller

  • Install mvn clean install

  • Make sure you have a running instance of AS7.

  • Prepare you forge script by saving this where ever you want and name it as you want, i.e scaffold.fsh

set ACCEPT_DEFAULTS true;
new-project --named blogapp;
persistence setup --provider HIBERNATE --container JBOSS_AS7;
validation setup --provider JAVA_EE;
entity --named Post;
field string --named title;
field string --named content;
rest setup --activatorType WEB_XML;
rest endpoint-from-entity --contentType application/json com.example.blogapp.model.*;
scaffold setup --scaffoldType html5-aerogear;

Using the Forge Plugin

  • In the console, run the forge script run pathToYourScript/scaffold.fsh

This will create a JEE app with persistence, REST enpoints. You should also see at the root of the project a file named config.json.

  • Scaffold the App ! scaffold from-entity com.example.blogapp.model.*;
  • Setup AS7 as7 setup
  • Deploy the app as7 deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment