Prerequisites:
If you want to create a new project using Celerio, and you have no database yet, simply follow the wizard
as explained in the previous chapter. When you are asked to select a sample database schema, select the
simplest one (named empty
).
mvn com.jaxio.celerio:bootstrap-maven-plugin:bootstrap
To add new entities, simply edit the sample sql file that was generated in the src/main/sql/h2
folder
and re-run the command, in general:
mvn -Pdb,metadata,gen generate-sources
First of all, DO NOT USE A PRODUCTION DATABASE You could loose some data.
Follow the wizard as explained in the previous chapter. When you are asked to select a sample
database schema, select the simplest one (named empty
).
mvn com.jaxio.celerio:bootstrap-maven-plugin:bootstrap
Once it completes, do not run any command beside cd <your_app>
To avoid any surprise, delete or rename the sample SQL file that was generated in the src/main/sql/h2
folder.
We do not want you to execute that script by mistake since you are going to use your own database.
Open the generated pom.xml file and provide all the information to access your database instead of the sample H2 database:
Tips:
Then try until it works to reverse your database, by running the following command:
mvn -Pmetadata generate-sources
When it works, you should get:
[INFO] Write metadata.xml file to src/main/config/celerio-maven-plugin/metadata.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
For your own curiosity you may open the generated metadata.xml file… but DO NOT MODIFY IT, it is used by Celerio to generate the source code.
Once database reverse works OK you may try to generate the source code
mvn -Pgen generate-sources
This is only the beginning… you can customize the generation in 3 ways:
© 2005-2015 Jaxio | @jaxiosoft | Legal