| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| building_transsecs_projects_with_a_command_line [2020/10/25 18:28] – wikiadmin | building_transsecs_projects_with_a_command_line [2020/11/11 14:09] (current) – wikiadmin |
|---|
| ===Choosing which Project to build=== | ===Choosing which Project to build=== |
| |
| When running TransSECS normally, the project loaded is described in the "application.properties" file in the TransSECS folder. This may look something like this: | When running TransSECS normally, the project loaded is described in the "application.properties" file in the TransSECS Builder folder. This may look something like this: |
| |
| <file> | <file> |
| </file> | </file> |
| |
| For this argument, you can provide a path (relative to the TransSECS Builder directory) to the customized application.properties file. TransSECS will read that file at startup and compile the project described in the file. For example, if you create a file in the folder C:\\ErgoTech\\TransSECSPlusReporting\\MIStudioSuite\\TransSECS\\Builder\buildprops called "headlessbuild.properties" with this content: | For this argument, you can provide a path (either relative to the TransSECS Builder directory or an absolute path) to the customized application.properties file. TransSECS will read that file at startup and compile the project described in the file. For example, if you create a subdirectory "buildprops" under the TransSECS Builder directory and place a "headlessbuild.propertie"s file in this subdirectory with this content: |
| |
| <file> | <file> |
| <file> | <file> |
| wrapper.app.parameter.2=buildprops\\headlessbuild.properties | wrapper.app.parameter.2=buildprops\\headlessbuild.properties |
| | </file> |
| | |
| | or as a full path for the headlessbuild.properties: |
| | |
| | <file> |
| | wrapper.app.parameter.2=C:\\Users\\Public\\ErgoTech\\TransSECSDevicesTrial\\buildprops\\headlessbuild.properties |
| </file> | </file> |
| |
| When you start the headless build, the project in C:\\Users\\MyProjects\\GEMTool will be built. | When you start the headless build, the project in C:\\Users\\MyProjects\\GEMTool will be built. |
| |
| This property can, again, be added as an argument in a script of batch file. This time at the end of the command line: | This property can, again, be added as an argument in a script or batch file at the end of the command line: |
| |
| <file> | <file> |
| java -Dtranssecs.headless=true .... buildprops/headlessbuild.properties | java -Dtranssecs.headless=true [... the rest of the command line ...] buildprops/headlessbuild.properties |
| </file> | </file> |
| | |
| | or, with a full path to the headlessbuild.properties |
| | |
| | <file> |
| | java -Dtranssecs.headless=true [... the rest of the command line ...] /home/username/TransSECSPlusReporting/MIStudioSuite/TransSECS/Builder/buildprops/headlessbuild.properties |
| | </file> |
| | |
| | where "the rest of the command line" contains the classpath -cp parameter (if classpath is not already defined), other java and jdk parameters and various TransSECS parameters as listed in the TransSECS.conf file in your script or batch file. |
| | |
| | An example bash script for Linux to run TransSECS Builder headless (check the current command line parameters in your installation's TransSECS.conf to verify). |
| | |
| | <file> |
| | CLASSPATH="./:./addons/*:../documentation/*:../../MIStudio/lib/*:../../MIStudio/lib/:../../MIStudio/jars/*:../../MIStudio/core/*:../../MIStudio/core/:../../MIStudio/core/lib/*:../../MIStudio/core/ant/lib/*:${JAVA_HOME}/lib/tools.jar:" |
| | |
| | /usr/lib/jvm/java-8-openjdk-amd64/bin/java -cp ${CLASSPATH} -Dsun.java2d.d3d=false -Dtranssecs.headless=true -Dsun.java2d.noddraw=true -Dtranssecs.applicationtype=0 -Dsun.lang.ClassLoader.allowArraySyntax=true -DLoggerClass=Log4JLogger com.ergotech.transsecs.secs.TransSecs /home/ergotech/TransSECSPlusReporting/MIStudioSuite/TransSECS/Builder/buildprops/headlessbuild.properties |
| | |
| | </file> |
| | |
| |
| |
| ===Building only a Selected Tools=== | ===Building Only Selected Tools=== |
| |
| Some TransSECS projects contain multiple tools. In this case, it is usual to build all the tools and the headless build will do this. There may be occasions where only a sub-set of the tools should be built. This is supported by adding additional tools to the command line. The name of the configuration properties file must be first - the "wrapper.app.parameter.2" as described above. The tools must then be added as "wrapper.app.parameter.3", "wrapper.app.parameter.4" and so on. The property is just the name of the tool as defined in the TransSECS project. The tool must already exist in the project. | Some TransSECS projects contain multiple tools. In this case, it is usual to build all the tools and the headless build will do this. There may be occasions where only a sub-set of the tools should be built. This is supported by adding additional tools to the command line. The name of the configuration properties file must be first - the "wrapper.app.parameter.2" as described above. The tools must then be added as "wrapper.app.parameter.3", "wrapper.app.parameter.4" and so on. The property is just the name of the tool as defined in the TransSECS project. The tool must already exist in the project. |