-
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
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;
- 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