« prev index next »

3. Bootstrap a sample project with Celerio

Run the bootstrap wizard

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/

Step back, take a look at the few files generated by the wizard

Before running the commands above, take a moment to discover the files that have been created by the wizard In general it includes:

These files above are the seeds to generate the project…

Reverse, generate and run the sample generated 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…

Get familiarized with the various maven profiles

The -P option stands for profile. In the above command, we activate:

All these profiles are declared in the main pom.xml file. The jetty:run starts an embedded web server.


© 2005-2015 Jaxio | @jaxiosoft | Legal