Requirements: Need apache ant installed. https://ant.apache.org/manual/ Need antcontrib module add-ons. http://ant-contrib.sourceforge.net/ Need svnant module add-ons. http://subclipse.tigris.org/svnant.html Place the svnAnt install dir in your main Apache Ant installation dir. The script needs a reference to the svnant install. Currently, this is hard-coded to : "${ant.home}/svnAnt/lib" which locates the file in the install location described above If this reference needs to be modified, it is located at about line 20 in the following: Change this reference in build.xml to the location of your svnant install. Optionally, this can also be specified from the command line instead of modifying build.xml: ant -Dmy.svnant.basedir=/my/new/path/svnant/lib Usage: Ant automatically uses build.xml as the default script. Therefore, usage is simple: "cd" to the directory holding build.xml run "ant" with no arguments. (unless specifying the svnant install dir, as noted above, which would then be ) ant -Dmy.svnant.basedir=/my/new/path/svnant/lib Additional infomation based on scripts in weps-ws-FetchAndBuildAll (see below) Server installation - Server information needed - [ServerURL] Web server URL. example: https://infosys.ars.usda.gov - [ServerPath] Web server root directory. The application will be served from this location. example: /usr/share/nginx/html - [ServerPathTomcat] Web server tomcat directory for .war files. example: /var/lib/tomcat9/webapps - [SourceURL] Repository server URL. example: https://infosys.ars.usda.gov - The repository needs to contain the following directories. If the relative repository paths are changed from the example, the script and .xml files will need to be modified to reference the alternate locations. - [SourceURL]/svn/code/spare_parts/NetbeansSupport/trunk/AntSvn - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/ars-weps - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-climate - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-common - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-core - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-gis-objects - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-gis-utils - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-weps-dataHandler - [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/csip-weps-reportGen - [SourceURL]/svn/code/weps_webstart/trunk/bootstrap - [SourceURL]/svn/code/weps_webstart/trunk/weps.gui - [SourceURL]/svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps.ws.CertInstaller - [SourceURL]/svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps.ws.CsipUtils - [SourceURL]/svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps.ws.JettyWebstart - [SourceURL]/svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps.ws.serverVersions - [SourceURL]/svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps-ws-FetchAndBuildAll - [SourceURL}/svn/code/weps1/trunk/weps.install/bin - [SourceURL}/svn/code/weps1/trunk/weps.install/cfg - [SourceURL}/svn/code/weps1/trunk/weps.install/db - [SourceURL}/svn/code/weps1/trunk/weps.install/help - [SourceURL}/svn/code/weps1/trunk/weps.install/readme - [SourceURL}/svn/code/weps1/trunk/weps.install/images - [SourceURL}/svn/code/weps1/trunk/weps.install/mcrew_cfg - [SourceURL}/svn/code/weps1/trunk/weps.install/tables - [SourceURL}/svn/code/weps1/trunk/weps.install/certs - [SourceURL}/svn/code/weps1/trunk/weps.install/wmrm - [SourceURL}/svn/code/weps1/trunk/weps.install/sweep - [SourceURL}/svn/code/weps1/trunk/weps.install/pictures - this repository location needs to be restricted to avoid security issues with the application. Independent application development will require creating a new set of code signing certificates. Key size needs to be greater than 1024. - [SourceURL]/[SourcePathCerts]/weps.ws.javaCerts - These locations and files on the repository server, inside and external to the respository, are required: - Repository file path: [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/ars-weps/src/java/bin/lin-amd64/ARS/default/weps External location: [SourceURL]/builds/weps1.science.subregion/lastSuccessfulBuild/gfortran64-optimize-linux/weps - Repository file path: [SourceURL]/svn/code/weps_webstart/trunk/weps.Csip/trunk/ars-weps/src/java/bin/lin-amd64/ARS/dev-version/weps External location: [SourceURL]/builds/weps1.science.subregion/184/gfortran64-optimize-linux/weps Note: this number (184) may change as development versions are moved to production versions - This file is referenced in the ARS_WEPS_base/index.html file which is modified with current build dates and copied to the webroot (wepstart) by the build process. The MSI only works with https://infosys.ars.usda.gov: - External file path: [SourceURL]/builds/bootloader/1/WEPS_Bootloader.msi - The following files are modified during the build process. - ars-weps/jenkins-build.xml (see: jenkins-build-ARS-override.xml) - ars-weps/src/java/bin/lin-amd64/ARS/dev-version/weps (see: build.weps-ws-FetchAndBuildScience.xml) - ars-weps/web/WEB-INF/csip-defaults.json (see: csip-core/src/csip/ServletContextHooks.java) - bootstrap/src/build.properties (see: bootstrap/build.xml) - csip-climate/web/META-INF/csip-conf.json (see: csip-core/src/csip/ServletContextHooks.java) - csip-climate/web/WEB-INF/csip-defaults.json (see: csip-core/src/csip/ServletContextHooks.java) - csip-core/src/csip/Config.java (see: csip-core/build.xml) - csip-weps-dataHandler/src/java/d/downloadData/Daily/ARS/ARSDaily.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-dataHandler/src/java/d/downloadData/Daily/NRCS/NRCSDaily.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-dataHandler/src/java/d/downloadData/Prerel/ARS/ARSPrerel.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-dataHandler/src/java/d/downloadData/Prerel/NRCS/NRCSPrerel.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-dataHandler/src/java/d/downloadData/Release/ARS/ARSRelease.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-dataHandler/src/java/d/downloadData/Release/NRCS/NRCSRelease.zip (see: build.weps-ws-FetchAndBuildInstall.xml) - csip-weps-reportGen/web/WEB-INF/csip-defaults.json (see: csip-core/src/csip/ServletContextHooks.java) - weps.gui-webstart/src/build.properties (see: build.weps-ws-FetchAndBuildMacros.xml) - ARS_WEPS_base/index.html (see: updateIndexHtmlDate.sh) - ARS_WEPS_base/nrcs.html (see: updateIndexHtmlDate.sh) - buildCodeVerARS_daily.txt (copied from buildCodeVer.txt if absent, otherwise unchanged, see: buildARSServerDaily.sh) - the following files are modfied and committed to the repository during promoteToPreRelease.sh execution - csip-weps-dataHandler/src/java/d/dataHandler/V1_1.java - buildCodeVerARS_pre_release.txt - buildDataVer.txt - buildDataVerARS_daily.txt - buildDataVerNRCS_daily.txt - buildDataVerARS_pre_release.txt - buildDataVerNRCS_pre_release.txt - the following files are modfied and committed to the repository during promoteToRelease.sh execution - buildCodeVerARS_release.txt - buildDataVerARS_release.txt - buildDataVerNRCS_release.txt - create a directory in which the build will take place [buildDir] [ex: build-wepstart]. In that directory, execute the commands: - svn co [SourceURL]/[SourcePath]/ . [SourcePath} is repository path to weps-ws-FetchAndBuildAll example: svn/code/weps_webstart/trunk/weps.WebStartUtils/trunk/weps-ws-FetchAndBuildAll - svn co [SourceURL]/[SourcePathCerts]/weps.ws.javaCerts [SourcePathCerts] is repository path to weps.ws.javaCerts - In [buildDir], edit the file "buildFunctions.sh" and assign values: SourceURL= ServerUrl= ServerPath= ServerPathTomcat= - In [buildDir], edit the file "promoteToPreRelease.sh" and assign values: SourceURL= If this is an initial install from a new repository containing a subset of the original repository: - edit build.weps-ws-FetchAndBuildScience.properties with the latest revision numbers as a starting point for tracking revisions for prerelase and release versions. - Edit index.html and remove references to the MSI file. It will not work with a rehomed server. - create or identify the webserver directory location. Create a directory named "wepstart" in [ServerPath] or, if created in another location, create a soft link named "wepstart" to the other location. User who runs the server installation commands must have permissions to write to the "wepstart" directory. To create the wepstart content, in [buildDir] do the following: - install openjdk-8-jdk-headless - buildARSServerScience.sh (requires install of tomcat, user must have write privileges for webapp directory) - buildARSServerDaily.sh Test the functionality of the build - promoteToPreRelease.sh Test the functionality of the PreRelease build - promoteToRelease.sh Test the functionality of the Release build For a new installation, all builds will be the same. They are staged to allow staging and testing of updates. In production, it may be desired to make only the Release build available. ARS_WEPS_base/index.html can be modifed accordingly (check that the modifcation does not break the build process), or modfied after the build if new builds are infrequent. Dependency Trees: buildARSServerScience.sh - buildFunctions.sh (doUpdateBuildFiles) - build.weps-ws-FetchAndBuildScience.xml -Dwb.parm.tomcatServerPath=${ServerPathTomcat} -Dweps.ws.FetchAndBuildAll.SourceURL="${SourceURL}" clean default - build.weps-ws-FetchAndBuildMacros.xml - build.weps-ws-FetchAndBuildInstall.xml target="default" - build.weps-ws-FetchAndBuildMacros.xml buildARSServerDaily.sh - buildFunctions.sh (doBuildGui, doMakeVer, doCopyVer, doBuildReminder) - build.xml - build.weps-ws-FetchAndBuildMacros.xml - build.weps-ws-FetchAndBuildGui.xml - build.weps-ws-FetchAndBuildMacros.xml target="-weps-ws-macros-init" promoteToPreRelease.sh - promoteNewDataHandlerVersion.sh - buildARSServerPreRel.sh - buildFunctions.sh (bumpCodeVer, doBuildGui, doMakeVer, doCopyVer, doBuildReminder) promoteToRelease.sh - buildARSServerRelease.sh - buildFunctions.sh (cpyFromPreRelVerFiles, doBuildGui, doMakeVer, doCopyVer, doBuildReminder) Creating a new subversion repository for hosting wepstart. This keeps the scripts in the original form. - Install the following if not already installed - subversion - Apache2 web server and modules required for subversion - Create home location for repository and create repositories. This can be done in the home location for Apache2 or softlinked to [repoDir] - make directory [repoDir]/svn - svnadmin create [repoDir]/svn/code - svnadmin create [repoDir]/svn/system - add [repoDir]/svn location to apache2 configuration - enable and configure svn_dav moduled (dav_svn.conf) - add admin user and promoteuser to both authz and passwd files in both repositories with rw permission. The promoteuser password needs to be saved by subversion user the server build user home directory. - restrict access to system repository. - Check out working copies of both repositories in [workingDir]. They should both be at revision 0. - In working directory, "svn export" the required locations from the source repository. - example: svn export https://infosys.ars.usda.gov/svn/code/spare_parts/NetbeansSupport/trunk/AntSvn spare_parts/NetbeansSupport/trunk/AntSvn This will place the AntSvn directory in the proper local respository location. - The system files export will require credentials - svn add and commit all of the required locations to the newly created respository. They can be added adn committed individually as they are exported or in a single action. - Edit the files indicated above to match the servers and configurations as noted above and commit the changes to the new repository. - Proceed with the build steps outlined above. Possible configurations" - Source from Infosys and create a new server instance (science and interface) - Source from alternate server and create a new server instance (science and interface) - Source from Infosys and create a new server instance (only build interface, not science and only use CSIP) - Source from alternate server and create a new server instance (only build interface, not science and only use CSIP)