This is probably the longest part of this step-by-step introduction. Download and install the following tools :
Configure Maven launch script to point to ${JAVA_HOME} and setup your path to include the "bin/" directory.
You must also increase the java heap space allocated to Maven :
on windows :
set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m (or set it as a user env variable)
on linux :
export MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=128m (or set it as a user env variable)
mvn archetype:generate -DarchetypeCatalog=http://repository.jspresso.org/maven2/
This instructs Maven to go to the Jspresso Maven repository to look for application archetypes. The output should be something like :
[INFO] Scanning for projects...
...
Choose archetype:
1: ... -> jspresso-archetype (Jspresso CE Archetype)
...
Choose a number: (1):
Define value for groupId: :
Define value for artifactId: :
Define value for version: 1.0-SNAPSHOT: :
Define value for package: com.example.helloworld: :
Maven outputs the following to let you review the project settings :
Confirm properties configuration:
jspressoVersion: 3.5.5
graphvizExecutable: C:/envdev/graphviz/bin/dot.exe
applicationDescription: Example Application Description
companyUrl: http://www.example.com
applicationName: Example Application
companyName: Example Company
siteDistributionUrl: file:///tmp/maven-site
groupId: com.example.helloworld
artifactId: helloworld
version: 1.0-SNAPSHOT
package: com.example.helloworld
Y: :
There are certainly default settings to change, so answer "N". Review all the questions and adapt the answers to your environment. Pay special attention to the following property (only if you want to document your Spring beans with Maven site plugin) :
Of course, you are free to change company name and URL, application name, and so on. Maven should re-output the property values and you can now validate ("Y") and launch the generation process. Wait for the "BUILD SUCCESSFUL" output.
You should now have a new directory helloworld generated. This is the maven project directory of your application. Everything is properly configured for you to work, package, install and generate documentation.
Move to the new generated helloworld project directory and type :
mvn package
This command may take some time to execute since Maven must download and install all the required plugins and dependencies in the machine local repository, so be patient and wait for the "BUILD SUCCESSFUL" output. Plugins and dependencies downloading is a one-time process since everything is now locally cached.
You should now have your webapp archive built and ready to be deployed. it is located here :
helloworld/webapp/target/helloworld-webapp.war
Your new project is preconfigured to run an embedded Jetty application server. Just start it with :
mvn jetty:run-exploded
Your Jspresso application is now accessible, with login demo/demo.
For the qooxdoo version, point your browser at :
http://localhost:8080/helloworld-webapp/qooxdoo/
For the Adobe's Flex version, point your browser at :
http://localhost:8080/helloworld-webapp/flex/
Congratulations! You have created, packaged and deployed your first Jspresso powered application. It's rather minimalistic but all the layers are here and working together :
If you give us a few more minutes, we will develop a small CRUD application. But don't forget that Jspresso is much, much more than a CRUD framework. Take a look at the documentation as well as the various screenshots and live demos to get a better understanding of it.