-
Notifications
You must be signed in to change notification settings - Fork 9
QuickStart
ybonnel edited this page May 21, 2013
·
6 revisions
The quickiest way to create a new project which use SimpleWeb4j is to use the archetype fr.ybonnel:simpleweb4j-archetype:0.0.4 :
mvn archetype:generate -DarchetypeGroupId=fr.ybonnel -DarchetypeArtifactId=simpleweb4j-archetype -DarchetypeVersion=0.0.4 -DgroupId=com.exemple -DartifactId=myapp -Dpackage=com.exemple.myapp -DclassName=MyApp -DwithHibernate=true -Dversion=0.0.1-SNAPSHOT
Archetype parameters :
- groupId : your groupId.
- artifactId : your artifactId.
- package (default = groupId) : the main package of your application.
- className (default = "HelloWorld") : the name of your main class.
- withHibernate (default = "true") : true if you want the entity managment, false otherwize.
- version : your version.
After archetype generated your project, you must have something like that :
|-pom.xml
|-Procfile
|-scripts
|---deploybees
|---deploybees.bat
|-src
|---main
|-----assembly
|-------cloudbees.xml
|-----java
|-------com
|---------exemple
|-----------myapp
|-------------MyApp.java
|-----resources
|-------com
|---------exemple
|-----------myapp
|-------------public
|---------------index.html
|---------------js
|-----------------myapp.js
|---------------partial
|-----------------main.html
|-----------------editOrNew.html
|---test
|-----java
|-------com
|---------exemple
|-----------myapp
|-------------MyAppTest.java
|-------------MyAppWebTest.java
|-system.properties
The following explains on each file are for the case "withHibernate=true" :
- pom.xml : the maven descriptor of your new project.
- Procfile and system.properties : all necessary files to deploy on heroku.
- deploybees and deploybees.bat : scripts to help you to deploy on cloudbees, usage : deploydess
- cloudbees.xml : assembly descriptor for cloudbees.
- MyApp.java : main class of your application, this class contains the main method to launch in order to start your server.
- index.html : main html, this is the entry of client side.
- myapp.js : contains all your angular code.
- main.html : html template for main page.
- editOrNew.html : html template for edit and new page.
- MyAppTest.java : test class for MyApp.
- MyAppWebTest.java : test class from browser (use fluentlenium with Phantom as driver).