DRBP Ant
Contents |
Ant tasks
Most common ant tasks
ant update.database
As you should know, the information included in the application dictionary (Windows, tabs, fields, Tables, references, preferences, etc.) is stored in XML files (DB XML Model) which are used to generate the DB. The aim of update.database task is to write into the database the information stored in the XML files.
When update.database is executed, it will check if the information stored in the XML files match with the information of the DB. If differences are found the action will not be done.
ant export.database
This task works like update.database but in the other direction, exporting the information of the modules which are marked as InDevelopment. Based on the information stored in the database, DB XML Model is updated. By default they are only exported in case there are modifications in the database. In addition performs database validations for the modules which are exported.
After execute this command you can check which stuff has changed in your environment (using Mercurial's hg diff command).
ant smartbuild
This task makes an incremental build of the application, it means, all the modified classes are compiled and deployed to tomcat.
A very common task is to perform an update.database and then build the application (smartbuild). To do it in just one step ant smartbuild -Dlocal=no can be executed.
If you want to be faster ant smartbuild -Dtr=no can be executed. This argument skip the translation process.
Other tasks
ant compile.complete
This task first removes all the generated files and then:
- generates Java classes for WAD windows
- generates Java classes from modified xsql files
- compiles all modified classes (including the generated ones)
- makes insertions in translation tables for non-existing entries for the manual UI files and copies everything to WebContent directory.
ant generate.entities
Reading the application dictionary (AD_TABLE & AD_COLUMN), this task generates the mapping between entities and DB tables. Then Java classes for each entity are generated in src-gen directory and compiled. These entities are used by DAL to access to the database information.
ant setup
This task is just required to create development environments or to create new instances. This task will download an executable file called setup-properties-[OS_NAME].[EXT] in config subdirectory. It should be executed to configure the instance.
Some Real Situations During Development Cycle Tasks
I've changed a PL in the database. what should I do?
- Mark your module as "In Development"
- Export your changes from database executing ant export.database
- Check that your changes are there using mercurial hg st ||| hg diff
- Make sure that you are committing just the changes that you want.
- Do Commit indicating the purpose of that in the message (hg ci -m "Fixed problem in PL XYZ because a wrong select")
- Check that ant smartbuild works fine
- Push (hg push)
I've changed a java file what should I do?
- Check that your changes are there using mercurial hg st ||| hg diff
- Make sure that you are committing just the changes that you want.
- Do Commit indicating the purpose of that in the message (hg ci -m "your message")
- Make sure that there are not errors in java (check it in eclipse or performing ant smartbuild)
- Push (hg push)
I'm going to start a new development and I need to update my local environment
- update your local repository (hg pull)
- update your local files (hg up)[hg pull -u will do this task and previous one]
- perform ant update.database in order to update your database with the last changes of the repository.
- rebuild the application executing ant smartbuild [ant smartbuild -Dlocal=no will do both tasks]
- My Database has local changes and update database cannot be done?
- Analyze which changes are not exported
- export them (first example of this section explains further actions)
If you are completely sure that database changes can be removed
ant smartbuild -Dlocal=no -Dforce=yes