Table of Contents
This chapter will help you to understand the basics of the Jspresso application framework and how to work with it.
One of the interesting feature of Jspresso is its native integration with standard build tools. All the complex build process is completely handled in Maven. Jspresso also offers a Maven archetype to quickly setup your project and import it directly in Eclipse.
Download, install and configure the following tools :
The Java Development Kit for your platform (JDK 6+).
The Apache Maven project management tool (3.0+).
The Eclipse IDE for Java EE Developers (3.6+).
the Apache Tomcat servlet container (6.0+).
You must also increase the java heap space allocated to Maven :
on windows : set MAVEN_OPTS=-Xmx512m (or set it
as a user env variable)
on linux : export MAVEN_OPTS=-Xmx512m (or set it
as a user env variable)
This is a one-step operation using the Jspresso application Maven archetype. Move to your Eclipse workspace and perform :
mvn archetype:generate
-DarchetypeCatalog=http://repository.jspresso.org/maven2/
And choose the “Jspresso Application Archetype”.
Then fill-in the questions with the following answers :
“groupId” :
org.jspresso.hrsample
“artifactId” : hrsample
“package” :
org.jspresso.hrsample
“version” : 1.0-SNAPSHOT
This will generate a complete project ready to be compiled and
packaged under the hrsample/ directory. So move to
the generated directory and type :
mvn package
The operation may take some time to finish since Maven will
download all the needed plugins and dependencies in its local
repository. Just wait for the “BUILD SUCCESSFUL” message
and you should have a packaged hrsample-webapp.war
in the hrsample/webapp/target/ directory.
Follow the installation steps described on the Jspresso site and then import the project skeleton you've generated using the M2Eclipse project import wizard.
The development environment is now set-up. We can begin the Human Resources sample application coding.