CICSTART was developed using the Eclipse IDE and Gradle as a build tool. Gradle is used for transient dependency management as well as to generate the Eclipse .project and .classpath files. Gradle is used to build the projects and package the war and zip assemblies, but not used for testing. To run the unit tests, right-click in Eclipse on the src/java/test folder and run junit tests.
To develop on CICSTART, clone (or fork) the repository as you would with any git repo.
- Clone the repository
- this will get source code to your local workstation. See GitHub getting started for more info.
- Run 'gradle eclipse' from /cicstart/cicstart
- This will generate the Eclipse .project and .classpath files
- Import into Eclipse
- Two projects: cicstart & database
- Generate the binary client files (for macro tests)
- run 'gradle distZip -x test'
- cd into build/distributions
- unzip cicstart-1.0.zip
- Create the PostgreSQL database and run the database migrations - see db-migrator project on github for more details
- createdb cicstart
- psql: add cicstart user
- edit migrator.properties and change the password of the cicstart database user
- run 'ant -f migrator.xml init' to initialize db-migrator on the cicstart database
- run 'ant -f migrator.xml upgrade-all' to run all the DDL scripts in the migrations directory
- Run the unit tests from within Eclipse
- you should now be able to run all the unit tests. Most/all should password
- Assemble was and zip distributions
- you can run 'gradle clean build war distZip -x test' to create the war and zip files used to deploy to a server
- we use Jetty on DAIR. The application has not been tested with any other application containers.
This is the script we use to build and deploy on the server:
#!/bin/bash VERSION=1.0 DEPLOY_DIR=/cicstart/jetty/webapps GIT_DIR=/cicstart/deploy/cicstart LIB_DIR=build/libs sudo ./stop.sh cd $GIT_DIR git pull gradle -b $GIT_DIR/cicstart/build.gradle clean war -x test sudo -u jetty cp $GIT_DIR/cicstart/$LIB_DIR/cicstart-$VERSION.war $DEPLOY_DIR/cicstart.war gradle -b $GIT_DIR/cicstart/build.gradle clean distZip sudo -u jetty rm -rf /cicstart/macro/client/cicstart-$VERSION sudo -u jetty unzip $GIT_DIR/cicstart/build/distributions/cicstart-$VERSION.zip -d /cicstart/macro/client cd /cicstart