Prerequisites:
Invoke the bootstrap
goal of the bootstrap-maven-plugin
.
From a command line executes (it may take some time to download all the dependencies the first time you use it):
mvn com.jaxio.celerio:bootstrap-maven-plugin:bootstrap
Note
Please note that this command may take a while to complete the first time as Maven needs to download all the necessary plugins and dependencies to build and run the project.
Follow the wizard, once it completes it prints some information on the console (see below), for the moment do not run any command:
FINAL STEPS:
1/ Optional: you can edit the generated pom.xml file to use your own database
2/ Execute the following commands:
cd jsf2_spring_conversation_bank
mvn -Pdb,metadata,gen jetty:run
3/ Then open http://localhost:8080/
Before running the commands above, take a moment to discover the files that have been created by the wizard In general it includes:
pom.xml
: A complete Maven POM file.src/main/sql/h2/01-create.sql
: an SQL script to create, init and drop a local H2 database. This is an example database that Celerio is going to reverse.src/main/config/celerio-maven-plugin/celerio-maven-plugin.xml
: A Celerio’s configuration file.src/main/config/celerio-maven-plugin/celerio-template-packs.xml
: Another Celerio’s configuration file.These files above are the seeds to generate the project…
You are now ready to:
To do so, from the same console as above, execute the Maven command as suggested by the wizard, for example:
cd jsf2_spring_conversation_bank
mvn -Pdb,metadata,gen jetty:run
Note
Please note that this command may take a while to complete the first time as Maven needs to download all the necessary plugins and dependencies to build and run the project.
Now you can try out your new web application. Open http://localhost:8080/ in your browser. Can you log in as admin/admin? If yes, congratulations!, all went well…
The -P
option stands for profile. In the above command, we activate:
db
profile to create a new database,metadata
profile to reverse the database schema,gen
profile to generate the corresponding source code.All these profiles are declared in the main pom.xml
file. The jetty:run
starts an embedded web server.
© 2005-2015 Jaxio | @jaxiosoft | Legal