Slave 1 (SIR) Supplementary Properties File
The Implementation teams must set the values for the properties in this file.
The supplementary properties file acts as a bridge between the slave 1 properties files and the slave 2 properties files.
For the slave 1 Ant script to be invoked successfully and trigger the mobile packages, you must set a few properties in a supplementary property file. For your understanding, the CTMobileBuilder.properties file has been taken as an example to demonstrate which of the properties need to be set. Note that the name of the supplementary property file will vary for your project.
You must ensure that there are proper values in the following mandatory properties:
Property | Description | Format | Example |
---|---|---|---|
slave.host | This property indicates the host name of slave 2. | String | 172.29.32.20 |
slave.username | This property indicates the username of slave 2. | String | - |
slave.password | This property indicates the password for slave 2. | String | - |
war.dest.location | This property indicates the location where the WAR file needs to be copied to slave 2. Usually the location is the directory where the project is registered on slave 2. The slave 2 Ant script also has a similar property called "war.location". The values in the "war.dest.location" and "war.location" must match. | String (URL) | /Users/admin/Documents/CanvasTechnology/BOA |
war.source.location | This property indicates the URL from where the WAR file needs to be copied to slave 1 machine. | String (URL) | D:/JBoss/server/default/deploy/BOA.war |
zip.source.location | This property indicates the URL of the zipped WAR file. You must zip the WAR file to reduce its size to quickly transfer to slave 2. | String (URL) | BOA.zip |
slave.script.location | This property indicates the location of the slave 2 Ant script. Usually the location is the directory where the project is registered on slave 2. | String (URL) | /Users/admin/Documents/CanvasTechnology/BOA/build.xml |
mobile.build.version | This property indicates the version of the mobile builds. | String | 2.1 |
From Canvas 17.1 onward, you can combine and compress the JavaScript files. To generate the combined and compressed files, refer the sample Ant target provided in the following code snippet. You must modify the Ant target in your system (SIR) as applicable.
<target name="-mobileBuild"> <if> <equals arg1="${PACKAGE_FOR_MOBILE}" arg2="Y" /> <then> <property file="modelHouseMobileBuilder.properties" /> <echo message="Compressing Implementation Team's JS Files" /> <antcall target="-compressImplJSFiles"> <param name="MOB_TEMP_WORK_DIR" value="${MODEL_BUILD_ROOT}/TEMP" /> <param name="MOB_CT_JARS_DIR" value="${CT_JARS_ROOT}" /> <param name="MOB_COMPRESSOR_ONDEMAND_FILE" value="${MODEL_SRC_ROOT}/CTModelHouseResources/src/main/resource/ondemandjsfiles_lib.xml" /> <param name="MOB_COMPRESSOR_ROOT_SRC_FOLDER" value="${CTMODEL_SVN_HOME}/CTModelHouse/Sources/CTModelHouse/src/main/" /> </antcall> <echo message="Preparing temp war File ${mobile.build.type}" /> <antcall target="-prepmobilebuild"> <param name="MOB_TEMP_WORK_DIR" value="${MODEL_BUILD_ROOT}/TEMP" /> <param name="TEMP_MODEL_WAR_FILE" value="${MODEL_BUILD_ROOT}/TEMP/ctmodelhouse.war" /> <param name="MOB_WAR_SOURCE_LOCATION" value="${MODEL_BUILD_ROOT}/war" /> <param name="MOB_BUILD_TYPE" value="${mobile.build.type}" /> </antcall> <echo message="Triggering mobile packaging for Modelhouse" /> <antcall target="canvas.packageForMobile"> <param name="SVN_ROOT" value="${CTMODEL_SVN_HOME}" /> <param name="MOBILE_PROPS" value="modelHouseMobileBuilder.properties" /> <param name="OUTPUT_DIR" value="${MODEL_DIST_ROOT}" /> <param name="BUILD_VERSION" value="${buildVersion}" /> <param name="war.source.location" value="${MODEL_BUILD_ROOT}/TEMP/ctmodelhouse.war.zip" /> </antcall> </then> <else> <echo message="Mobile packaging disabled for this build." level="info" /> </else> </if> </target>