Sleds/masterbuild/build.xml

897 lines
33 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="help" name="Sequence Logic Master Build"
xmlns:artifact="antlib:org.apache.maven.artifact.ant"
xmlns:ac="antlib:net.sf.antcontrib">
<!-- ANT contrib -->
<taskdef
resource="net/sf/antcontrib/antlib.xml"
classpath="lib/ant-contrib-1.0b3.jar"
uri="antlib:net.sf.antcontrib"
onerror="fail">
</taskdef>
<!-- Maven integration -->
<path id="maven-ant-tasks.classpath" path="lib/maven-ant-tasks-2.1.3.jar" />
<typedef
resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
onerror="fail"
classpathref="maven-ant-tasks.classpath" />
<!-- Set BUILD_PROPERTY_FILE to the property file with the variables to
be used for building. -->
<property name="BUILD_PROPERTY_FILE" value="build.properties" />
<!-- Use this file if it exists -->
<property file="${BUILD_PROPERTY_FILE}" />
<!-- Require environment and various env vars -->
<property environment="env" />
<!-- Default property values -->
<property name="webapps" value="../sli/target/sli.war ../clux/target/clux.war ../qaffle/target/qaffle.war ../ballot/target/ballot.war ../webcore/playground.war"/>
<property name="build.kind" value="release" />
<property name="maven.profiles" value="dev,osx" />
<property name="all.nobuild" value="dtjs jmeter thirdparty utils" />
<property name="make" value="make" />
<property name="nmake" value="nmake" />
<!-- property name="openssl.version" value="openssl-SNAP-20130501" -->
<property name="cg.web.server" value="localhost"/>
<property name="cg.web.server.scheme" value="http"/>
<property name="cg.web.server.port" value=":8080"/>
<property name="dyld.library.path" value="${env.DYLD_LIBRARY_PATH}"/>
<property name="ld.library.path" value="${env.LD_LIBRARY_PATH}"/>
<property name="documentation.root" value="docs"/>
<property name="version" value="1.0.0"/>
<property name="eyeversion" value="1.0.0"/>
<!-- One can override the components or this entire bit -->
<property name="test.server.cg" value="${cg.web.server.scheme}://${cg.web.server}${cg.web.server.port}"/>
<property name="test.server.sg" value="${cg.web.server.scheme}://${cg.web.server}${cg.web.server.port}"/>
<property name="test.server.mongo" value="${cg.web.server}"/>
<!-- OS dependent -->
<condition property="platform" value="Darwin"><os family="mac"/></condition>
<condition property="platform" value="lin64"><os family="unix"/></condition>
<condition property="platform" value="win32"><os family="windows"/></condition>
<echo message="platform is: ${platform}"/>
<!-- Derived from platform -->
<!--
<condition property="sequencelogic.home" value="/Users/sl" else="/home/sl"><equals arg1="${platform}" arg2="Darwin"/></condition>
-->
<property name="sequencelogic.home" value="/sequencelogic"/>
<!-- Build info -->
<tstamp>
<format property="build.date" pattern="MM/dd/yyyy hh:mm aa"/>
<format property="build.stamp" pattern="yyyyMMdd-hhmm"/>
<format property="js.arg" pattern="yyyyMMddhhmm" />
</tstamp>
<!-- everything that can and should be tagged; all but Dovetail -->
<property name="all.taggable" value="masterbuild configuration sleds-deployment javacore javaweb db libeye libeye.js convertasaurus convertasaurus-ui sgsl-dataflow sli clux qaffle ballot webcore resources" />
<!-- What to build derived from platform -->
<ac:if>
<ac:equals arg1="${platform}" arg2="Darwin" />
<ac:then>
<echo message="*** Mac OSX ***" />
<property name="all.maven.pre" value="dtcore dtcs dtdb dtservlet dtxml configuration mongo-tail"/>
<property name="all.make" value="libeye resources libeye.js cppjson sleds-core-api" />
<property name="all.maven" value="javacore javamq scatd sleds-core-api javaweb db posting convertasaurus convertasaurus-ui sgsl-dataflow webcore sli clux qaffle ballot playground diff-utils scorewalker robot robot-orcs auto_test" />
<property name="all.make.post" value="" />
<property name="all.maven.post" value=""/>
<property name="all.maven.deploy" value=""/>
<property name="all.ant" value=""/>
<property name="all.ndk" value=""/>
<property name="all.xcode" value="" />
<property name="all.nmake" value="" />
<property name="all.visualstudio" value="" />
</ac:then>
<ac:elseif>
<ac:equals arg1="${platform}" arg2="lin64" />
<ac:then>
<echo message="*** Linux ***" />
<property name="all.make" value="libeye resources libeye.js cppjson slocr pdf-bookmarker sleds-core-api" />
<property name="all.make.post" value="" />
<property name="all.maven.pre" value="dtcore dtcs dtxml dtdb dtservlet configuration mongo-tail" />
<property name="all.maven" value="javacore javamq scatd sleds-core-api javaweb db posting convertasaurus convertasaurus-ui sgsl-dataflow webcore sli clux qaffle ballot playground diff-utils scorewalker robot robot-orcs auto_test" />
<property name="all.maven.post" value="sleds-deployment" />
<property name="all.maven.deploy" value="dtcore dtcs dtxml dtdb dtservlet configuration javacore javaweb db sgsl-dataflow webcore sli clux qaffle ballot playground robot-orcs auto_test sleds-deployment" />
<property name="all.ant" value=""/>
<property name="all.ndk" value=""/>
<property name="all.xcode" value="" />
<property name="all.nmake" value="" />
<property name="all.visualstudio" value="" />
</ac:then>
</ac:elseif>
<ac:else>
<echo message="*** Windows ***" />
<property name="all.make" value="" />
<property name="all.maven.pre" value="" />
<property name="all.maven.post" value="" />
<property name="all.maven.deploy" value="" />
<property name="all.maven" value="" />
<property name="all.ant" value=""/>
<property name="all.xcode" value="" />
<property name="all.nmake" value="libeye" />
<property name="all.visualstudio" value="" />
</ac:else>
</ac:if>
<!-- Final derivations -->
<property name="sl.services" value="${sequencelogic.home}/bin/sequencelogic-services.sh" />
<exec command="git rev-parse --abbrev-ref HEAD" outputproperty="build.branch"/>
<exec command="git rev-parse HEAD" outputproperty="build.commit"/>
<propertyfile file="masterbuild-version.properties" comment="# Automatically generated; do not edit">
<entry key="master.build.date" value="${build.date}"/>
<entry key="master.build.stamp" value="${build.stamp}"/>
<entry key="master.build.tag" value="${build.stamp}"/>
<entry key="master.build.branch" value="${build.branch}"/>
<entry key="master.build.git.commit" value="${build.commit}"/>
<entry key="js.arg" value="${js.arg}"/>
</propertyfile>
<!-- Required for javadoc -->
<path id="project.classpath">
<pathelement location="${user.home}/.m2/repository/org/json/json/20090211/json-20090211.jar"/>
<pathelement location="${user.home}/.m2/repository/com/dt/dovetail7/1.2.0/dovetail7-1.2.1.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/libeye/${eyeversion}/libeye-${eyeversion}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/csf/${version}/csf-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/convertasaurus/${version}/convertasaurus-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/walker-indexer/${version}/walker-indexer-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/walker-classifier/${version}/walker-classifier-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/convertasaurus/${version}/convertasaurus-ui-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sequencelogic/web/${version}/ijw-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/com/ionu/eyecontainer/${version}/eyecontainer-${version}.jar"/>
<pathelement location="${user.home}/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
<pathelement location="${user.home}/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar"/>
<pathelement location="${user.home}/.m2/repository/javax/servlet/servlet-api/3.0-alpha-1/servlet-api-3.0-alpha-1.jar"/>
<pathelement location="${user.home}/.m2/repository/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sun/jersey/jersey-client/1.3/jersey-client-1.3.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sun/jersey/contribs/jersey-multipart/1.3/jersey-multipart-1.3.jar"/>
<pathelement location="${user.home}/.m2/repository/com/sun/jersey/jersey-server/1.3/jersey-server-1.3.jar"/>
<pathelement location="${user.home}/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar"/>
<pathelement location="${user.home}/.m2/repository/jaxen/jaxen/1.1.1/jaxen-1.1.1.jar"/>
<pathelement location="${user.home}/.m2/repository/org/mongodb/mongo-java-driver/2.10.0/mongo-java-driver-2.10.0.jar"/>
</path>
<!-- Shortcuts to apply a single operation to a list of directories -->
<macrodef name="do-maven">
<attribute name="projects"/>
<attribute name="goal" />
<attribute name="skip" default="-DdoTests" />
<sequential>
<ac:for list="@{projects}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<artifact:mvn pom="../@{dir}/pom.xml" mavenHome="${env.MAVEN_HOME}" fork="true" failonerror="true">
<jvmarg value="-Xms500m"/>
<jvmarg value="-Xmx1500m"/>
<arg value="--activate-profiles" />
<arg value="${maven.profiles}" />
<arg value="help:active-profiles" />
</artifact:mvn>
<artifact:mvn pom="../@{dir}/pom.xml" mavenHome="${env.MAVEN_HOME}"
fork="true" failonerror="true">
<jvmarg value="-Xms500m"/>
<jvmarg value="-Xmx1500m"/>
<jvmarg value="-Xss3M"/>
<arg value="--activate-profiles" />
<arg value="${maven.profiles}" />
<arg value="-Dtest.server.cg=${test.server.cg}"/>
<arg value="-Dtest.server.sg=${test.server.sg}"/>
<arg value="-Dtest.server.mongo=${test.server.mongo}"/>
<arg value="-U" />
<arg value="@{goal}" />
<arg value="@{skip}" />
</artifact:mvn>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-make">
<attribute name="goal" />
<sequential>
<ac:for list="${all.make}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<exec executable="${make}" dir="../@{dir}" failonerror="true">
<arg value="@{goal}" />
<env key="BRANCH_NAME" value="${build.branch}"/>
</exec>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-make-post">
<attribute name="goal" />
<sequential>
<ac:for list="${all.make.post}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<exec executable="${make}" dir="../@{dir}" failonerror="true">
<arg value="@{goal}" />
<env key="BRANCH_NAME" value="${build.branch}"/>
</exec>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-nmake">
<attribute name="goal" />
<sequential>
<ac:for list="${all.nmake}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** nmake: @{dir} ***</echo>
<exec executable="${nmake}" dir="../@{dir}" failonerror="true">
<arg value="/F" />
<arg value="Nmakefile" />
<arg value="@{goal}" />
<arg value="${build.kind}=yes" />
<arg value="CG_SERVER=${test.server.cg}" />
<arg value="SG_SERVER=${test.server.sg}" />
<arg value="MONGO_SERVER=${test.server.mongo}" />
<env key="BRANCH_NAME" value="${build.branch}"/>
</exec>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-visualstudio">
<attribute name="goal" />
<sequential>
<ac:for list="${all.visualstudio}" delimiter=" " param="dir"
trim="true">
<ac:sequential>
<echo>*** Visual Studio: @{dir} ***</echo>
<ac:for list="@{goal}" delimiter=" " param="cmd" trim="true">
<ac:sequential>
<ac:if>
<ac:or>
<ac:equals arg1="@{cmd}" arg2="compile" />
<ac:equals arg1="@{cmd}" arg2="install" />
</ac:or>
<ac:then>
<basename property="vs.slnname" file="../@{dir}.sln" />
<exec executable="devenv" dir="../@{dir}" failonerror="true">
<arg value="${vs.slnname}" />
<arg value="/Out" />
<arg value="c:\temp\vs.log" />
<arg value="/build" />
<arg value="${build.kind}" />
</exec>
<ac:var name="vs.slnname" unset="true" />
</ac:then>
<ac:elseif>
<ac:equals arg1="@{cmd}" arg2="clean" />
<ac:then>
<basename property="vs.slnname" file="../@{dir}.sln" />
<exec executable="devenv" dir="../@{dir}" failonerror="true">
<arg value="${vs.slnname}" />
<arg value="/Out" />
<arg value="c:\temp\vs.log" />
<arg value="/clean" />
<arg value="${build.kind}" />
</exec>
<ac:var name="vs.slnname" unset="true" />
</ac:then>
</ac:elseif>
</ac:if>
</ac:sequential>
</ac:for>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-xcode">
<attribute name="goal" />
<sequential>
<ac:for list="${all.xcode}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<ac:for list="@{goal}" delimiter=" " param="cmd" trim="true">
<ac:sequential>
<ac:if>
<ac:equals arg1="@{cmd}" arg2="compile" />
<ac:then>
<ant antfile="build.xml" dir="${objc.project.dir}" target="build-only" />
</ac:then>
<ac:elseif>
<ac:equals arg1="@{cmd}" arg2="clean" />
<ac:then>
<ant antfile="build.xml" dir="${objc.project.dir}" target="clean" />
</ac:then>
</ac:elseif>
<ac:elseif>
<ac:equals arg1="@{cmd}" arg2="install" />
<ac:then>
<ant antfile="build.xml" dir="${objc.project.dir}" target="build-only" />
</ac:then>
</ac:elseif>
<ac:elseif>
<ac:equals arg1="@{cmd}" arg2="install-no-tests" />
<ac:then>
<ant antfile="build.xml" dir="${objc.project.dir}" target="build-only" />
</ac:then>
</ac:elseif>
<ac:elseif>
<ac:equals arg1="@{cmd}" arg2="test" />
<ac:then>
<ant antfile="build.xml" dir="${objc.project.dir}" target="test-only" />
</ac:then>
</ac:elseif>
</ac:if>
</ac:sequential>
</ac:for>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-sloccount">
<sequential>
<ac:for list="${all.taggable}"
delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} SLOC to ${documentation.root}/sloccount/@{dir} ***</echo>
<mkdir dir="${documentation.root}/sloccount"/>
<mkdir dir="${documentation.root}/sloccount/win"/>
<exec executable="sloccount" dir="../@{dir}" output="${documentation.root}/sloccount/@{dir}-sloc.txt">
<arg value="."/>
</exec>
</ac:sequential>
</ac:for>
<echo message="Generate overall SLOC for: dtcore dtcs dtdb dtxml dtservlet dtjs ${all.taggable} to: ${documentation.root}/sloc.txt"/>
<exec executable="sloccount" dir=".." output="${documentation.root}/sloc.txt">
<arg line="dtcore dtcs dtdb dtxml dtservlet dtjs ${all.taggable}"/>
</exec>
</sequential>
</macrodef>
<macrodef name="do-ant">
<attribute name="goal" />
<sequential>
<ac:for list="${all.ant}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<ant dir="../@{dir}" target="@{goal}">
<env key="BRANCH_NAME" value="${build.branch"/>
</ant>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<macrodef name="do-ndk">
<attribute name="goal" />
<sequential>
<ac:for list="${all.ndk}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** @{dir} ***</echo>
<ac:if>
<ac:equals arg1="@{goal}" arg2="compile" />
<ac:then>
<exec executable="ndk-build" dir="../@{dir}" failonerror="true"/>
</ac:then>
<ac:else>
<exec executable="ndk-build" dir="../@{dir}" failonerror="true">
<arg value="@{goal}" />
</exec>
</ac:else>
</ac:if>
</ac:sequential>
</ac:for>
</sequential>
</macrodef>
<echo>
************************************************************
******************* SL Master Build **********************
************************************************************
*** Environment
CATALINA_HOME :: ${env.CATALINA_HOME}
DYLD_LIBRARY_PATH :: ${dyld.library.path}
LD_LIBRARY_PATH :: ${ld.library.path}
BUILD_OUT :: ${env.BUILD_OUT}
*** Build info
build.date :: ${build.date}
build.stamp :: ${build.stamp}
build.version :: ${build.version}
build.tag :: ${build.tag}
build.branch :: ${build.branch}
build.commit :: ${build.commit}
*** Java properties
os.arch :: ${os.arch}
os.name :: ${os.name}
user.dir :: ${user.dir}
user.name :: ${user.name}
user.home :: ${user.home}
*** Configurable properties
build.kind :: ${build.kind}
maven.profiles :: ${maven.profiles}
*** Derived properties
platform :: ${platform}
sequencelogic.home :: ${sequencelogic.home}
make :: ${make}
nmake :: ${nmake}
*** Test
test.server.cg :: ${test.server.cg}
test.server.sg :: ${test.server.sg}
test.server.mongo :: ${test.server.mongo}
*** Taggable projects
all.taggable :: ${all.taggable}
*** Projects to build
all.maven.pre :: ${all.maven.pre} (Java)
all.maven :: ${all.maven} (Java)
all.make :: ${all.make} (C/C++ portable)
all.make.post :: ${all.make.post} (C/C++ portable)
all.ant :: ${all.ant} (Android/Javadoc)
all.ndk :: ${all.ndk} (Android JNI)
all.xcode :: ${all.xcode} (iOS/OSX)
all.nmake :: ${all.nmake} (Windows)
all.visualstudio:: ${all.visualstudio}
all.nobuild :: ${all.nobuild}
************************************************************
</echo>
<!-- std token filters -->
<filterset id="build.token.filters">
<filter token="BUILDDATE" value="${build.date}" />
<filter token="BUILDSTAMP" value="${build.stamp}" />
</filterset>
<!-- Standard init -->
<target name="init">
<echo message=">>> init" />
<ac:for list="${all.maven.pre} ${all.maven} ${all.make} ${all.nmake} ${all.ndk} ${all.visualstudio} ${all.ant} ${all.nobuild}" delimiter=" " param="dir"
trim="true">
<ac:sequential>
<available property="@{dir}.exists" file="../@{dir}"
type="dir" />
</ac:sequential>
</ac:for>
<!-- Useful info -->
<exec executable="uname" outputproperty="uname">
<arg value="-a"/>
</exec>
<echo>UNAME: ${uname}</echo>
</target>
<!-- Validate initialization -->
<target name="validate" depends="init">
<echo message=">>> Checking environment..." />
<ac:if>
<ac:not>
<ac:equals arg1="${platform}" arg2="win32" />
</ac:not>
<ac:then>
<!--
<fail unless="env.MAVEN_HOME" message="MAVEN_HOME not defined in environment" />
<fail unless="env.CATALINA_HOME" message="CATALINA_HOME not defined in environment" />
<fail unless="env.ANDROID_HOME" message="ANDROID_HOME not defined in environment" />
<fail unless="env.NDK" message="NDK not defined in environment" />
-->
</ac:then>
</ac:if>
<fail unless="env.JAVA_HOME" message="JAVA_HOME not defined in environment" />
<!--
<fail unless="env.PLATFORM"
message="PLATFORM not defined in environment (note: it can be blank for auto-detect)" />
-->
<!--
<fail unless="env.FOO" message="Failure test"/>
-->
<ac:if>
<ac:equals arg1="${platform}" arg2="Darwin" />
<ac:then>
<fail unless="dyld.library.path" message="DYLD_LIBRARY_PATH" />
</ac:then>
<ac:elseif>
<ac:equals arg1="${platform}" arg2="lin64" />
<ac:then>
<fail unless="ld.library.path" message="LD_LIBRARY_PATH" />
</ac:then>
</ac:elseif>
</ac:if>
<echo message="Checking directories..." />
<ac:for list="${all.maven.pre} ${all.maven} ${all.make} ${all.nmake} ${all.ndk} ${all.visualstudio} ${all.ant} ${all.nobuild}" delimiter=" " param="existsvar"
trim="true">
<ac:sequential>
<echo message="Check directory: @{existsvar}"/>
<fail unless="@{existsvar}.exists" message="Directory ../@{existsvar} does not exist (check it out from GIT!)" />
</ac:sequential>
</ac:for>
<echo message="Your build/OS environment validates" />
</target>
<!-- Writes a properties file and other build versioning data -->
<target name="set-version">
</target>
<!-- Clean your output dir -->
<target name="clean" depends="validate">
<echo message=">>> clean" />
<do-maven projects="${all.maven.pre}" goal="clean"/>
<do-make goal="clean"/>
<do-nmake goal="clean"/>
<do-visualstudio goal="clean"/>
<do-maven projects="${all.maven}" goal="clean"/>
<do-ndk goal="clean"/>
<do-ant goal="clean"/>
<do-xcode goal="clean"/>
</target>
<!-- Compile -->
<target name="compile" depends="validate">
<echo message=">>> compile" />
<do-maven projects="${all.maven.pre}" goal="compile"/>
<do-make goal="compile"/>
<do-nmake goal="compile"/>
<do-visualstudio goal="compile"/>
<do-maven projects="${all.maven}" goal="compile"/>
<do-ndk goal="compile"/>
<do-ant goal="compile"/>
<do-xcode goal="compile"/>
</target>
<!-- Test -->
<target name="test" depends="validate">
<echo message=">>> test" />
<do-maven projects="${all.maven.pre}" goal="test"/>
<do-make goal="test"/>
<do-nmake goal="test"/>
<!-- <do-visualstudio goal="test"/> -->
<do-maven projects="${all.maven}" goal="test"/>
<do-ant goal="test"/>
<!-- todo reenable do-xcode goal="test" -->
</target>
<target name="skipTests">
<echo message="Skipping tests"/>
</target>
<!-- Install -->
<target name="install" depends="validate,test">
<echo message=">>> install" />
<do-maven projects="${all.maven.pre}" goal="install" skip="-DskipTests"/>
<do-make goal="install"/>
<do-nmake goal="install"/>
<do-visualstudio goal="install"/>
<do-maven projects="${all.maven}" goal="install" skip="-DskipTests"/>
<!-- n.b. "install" is for a device install in Android speak so that's not what we invoke -->
<do-ndk goal="compile"/>
<do-ant goal="${build.kind}"/>
<do-xcode goal="install"/>
<!-- Set the build number -->
<buildnumber />
</target>
<!-- Install without test-->
<target name="install-no-tests" depends="validate">
<echo message=">>> install-no-tests" />
<do-maven projects="${all.maven.pre}" goal="install" skip="-DskipTests"/>
<do-make goal="install"/>
<do-nmake goal="install"/>
<do-visualstudio goal="install"/>
<do-maven projects="${all.maven}" goal="install" skip="-DskipTests"/>
<do-make-post goal="install"/>
<!-- n.b. "install" is for a device install in Android speak so that's not what we invoke -->
<do-ndk goal="compile"/>
<do-ant goal="${build.kind}"/>
<do-xcode goal="install-no-tests"/>
<do-maven projects="${all.maven.post}" goal="assembly:single" skip="-DskipTests"/>
<do-maven projects="${all.maven.deploy}" goal="deploy" skip="-DskipTests"/>
<!-- Set the build number -->
<buildnumber />
</target>
<!-- package -->
<target name="package" depends="validate">
<echo message=">>> package" />
<do-maven projects="${all.maven.pre}" goal="package" skip="-DskipTests"/>
<do-make goal="package"/>
<do-nmake goal="package"/>
<do-visualstudio goal="package"/>
<do-maven projects="${all.maven}" goal="package" skip="-DskipTests"/>
<do-ndk goal="package"/>
<do-ant goal="package"/>
<do-xcode goal="package"/>
</target>
<!-- Update -->
<target name="update" depends="validate">
<echo message=">>> update" />
<fail message="convert to GIT"/>
<do-svn command="update" />
</target>
<!-- Status -->
<target name="status" depends="validate">
<echo message=">>> status" />
<fail message="convert to GIT"/>
<do-svn command="status" />
</target>
<!-- Commit -->
<target name="commit" depends="validate">
<echo message=">>> commit" />
<fail unless="commit.message" message="Specify -Dcommit.message on command line!"/>
<fail message="convert to GIT"/>
<do-svn command="commit" arg1="--message" arg2="${commit.message}"/>
</target>
<!-- Tag -->
<target name="tag" depends="validate">
<echo message=">>> tag" />
<fail unless="tag.name" message="Specify -Dtag.name on command line!"/>
<fail unless="commit.message" message="Specify -Dcommit.message on command line!"/>
<fail message="convert to GIT"/>
<do-svntag tag="${tag.name}" msg="${commit.message}" />
</target>
<!-- Document -->
<target name="document" depends="validate, javadoc">
<echo message=">>> document"/>
<mkdir dir="${documentation.root}"/>
<do-sloccount/>
<fail message="convert to GIT"/>
<do-svnstat/>
<do-svnlog/>
</target>
<target name="javadoc">
<!--
These should be part of specific targets/goals/rules in the sub-builds.
For now, just assume...
-->
<ac:for list="${all.maven.pre}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** javadoc @{dir} to ${documentation.root}/javadoc/@{dir} ***</echo>
<javadoc sourcepath="../@{dir}/src/java" packagenames="*"
destdir="${documentation.root}/javadoc/@{dir}"
access="private" author="true" version="true"
encoding="ISO8859-1"
classpathref="project.classpath"
>
</javadoc>
</ac:sequential>
</ac:for>
<ac:for list="${all.maven}" delimiter=" " param="dir" trim="true">
<ac:sequential>
<echo>*** javadoc @{dir} to ${documentation.root}/javadoc/@{dir} ***</echo>
<javadoc sourcepath="../@{dir}/src/main/java" packagenames="*"
destdir="${documentation.root}/javadoc/@{dir}"
access="private" author="true" version="true"
encoding="UTF-8"
classpathref="project.classpath"
>
</javadoc>
</ac:sequential>
</ac:for>
</target>
<!-- Deploy to localhost -->
<target name="deploy" depends="validate">
<echo message=">>> deploy"/>
<!-- Tomcat -->
<echo message="Tomcat deploy" />
<ac:for list="${webapps}" delimiter=" " param="webapp" trim="true">
<ac:sequential>
<echo>*** @{webapp} to ${env.CATALINA_HOME}/webapps ***</echo>
<copy file="@{webapp}" todir="${env.CATALINA_HOME}/webapps" />
</ac:sequential>
</ac:for>
<!--
<chgrp file="../dt7/src/native/libnativefile.*" group="sl"/>
<chgrp file="${user.home}/.m2/repository/com/dt/nativefile/${version}/nativefile-${version}.jar" group="sl"/>
-->
<copy todir="${env.CATALINA_HOME}/lib">
<!-- JNI libs -->
<fileset dir="../thirdparty/openssl/lib/${platform}">
<include name="libcrypto*.*"/>
<include name="libssl*.*"/>
</fileset>
<fileset dir="../libeye/lib/${platform}">
<include name="libeye.*"/>
</fileset>
<fileset dir="${user.home}/.m2/repository/com/sequencelogic/libeye/${eyeversion}/">
<include name="libeye-${eyeversion}.jar"/>
</fileset>
<fileset dir="src/install">
<include name="*.jar"/>
</fileset>
</copy>
<copy tofile="${env.CATALINA_HOME}/lib/libeye-${eyeversion}.jar" file="../libeye/libeye-${eyeversion}.jar"/>
<echo>*** robot to ${sequencelogic.home} ***</echo>
<copy file="../robot/robot.sh" todir="${sequencelogic.home}/bin"/>
<copy file="../robot/testnikki.sh" todir="${sequencelogic.home}/bin"/>
<copy file="../robot/loadbot.sh" todir="${sequencelogic.home}/bin"/>
<chmod file="${sequencelogic.home}/bin/robot.sh" perm="ug+rx"/>
<chmod file="${sequencelogic.home}/bin/testnikki.sh" perm="ug+rx"/>
<chmod file="${sequencelogic.home}/bin/loadbot.sh" perm="ug+rx"/>
<copy file="../robot/target/robot-one-jar.jar" todir="${sequencelogic.home}/bin"/>
<copy file="../configuration/target/configuration-one-jar.jar" todir="${sequencelogic.home}/bin"/>
<copy tofile="${sequencelogic.home}/bin/libeye-${eyeversion}.jar" file="../libeye/lib/libeye-{eyeversion}.jar"/>
<copy todir="${sequencelogic.home}/bin">
<!-- JNI libs -->
<fileset dir="../thirdparty/openssl/lib/${platform}">
<include name="libcrypto*.*"/>
<include name="libssl*.*"/>
</fileset>
<fileset dir="../libeye/lib/${platform}">
<include name="libeye.*"/>
</fileset>
<fileset dir="../utils">
<include name="*.sh"/>
</fileset>
</copy>
<antcall target="email">
<param name="message.subject">[SL Masterbuild] Deploy completed on ${platform}</param>
<param name="message.body">Deploy completed ${platform} on ${build.date}</param>
</antcall>
</target>
<target name="email">
<mail mailhost="smtp.gmail.com" mailport="465" subject="${message.subject}"
enableStartTLS="true" ssl="true" user="timberes.developer@gmail.com" password="l3tm3inn0w">
<from address="timberes.developer@gmail.com" />
<replyto address="tim@sequencelogic.int" />
<to address="rd@sequencelogic.int" />
<message>
${message.body}
${uname}
</message>
</mail>
</target>
<target name="wait">
<sleep seconds="8"/>
</target>
<target name="restart" depends="validate">
<echo message=">>> restart"/>
<echo message="Restart Tomcat..."/>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="all" />
<arg value="stop" />
</exec>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="all" />
<arg value="start" />
</exec>
</target>
<target name="start-tomcat" depends="validate">
<echo message=">>> Start Tomcat..."/>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="tomcat" />
<arg value="start" />
</exec>
</target>
<target name="stop-tomcat" depends="validate">
<echo message=">>> Stop Tomcat..."/>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="tomcat" />
<arg value="stop" />
</exec>
</target>
<target name="start-all" depends="validate">
<echo message=">>> Start All..."/>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="all" />
<arg value="start" />
</exec>
</target>
<target name="stop-all" depends="validate">
<echo message=">>> Stop All..."/>
<exec executable="${sl.services}" dir="${env.CATALINA_HOME}/logs" failonerror="true">
<arg value="all" />
<arg value="stop" />
</exec>
</target>
<target name="remove-webapps" depends="validate">
<echo message=">>> Remove Tomcat webapps..."/>
<exec executable="rm" dir="${env.CATALINA_HOME}/webapps" failonerror="true">
<arg value="-rf" />
<arg value="sli" />
<arg value="clux" />
<arg value="qaffle" />
<arg value="playground" />
</exec>
</target>
<target name="deploy-restart" depends="stop-all, wait, remove-webapps, deploy, start-all"/>
<target name="deploy-test" depends="deploy-restart, functional-test"/>
<target name="functional-test" depends="validate">
<echo message=">>> functional-test"/>
<exec executable="./lt-gui.sh" dir="../jmeter" failonerror="true">
<arg value="func" />
<arg value="headless" />
<arg value="-J" /> <arg value="test.server=${cg.web.server}" />
<arg value="-J" /> <arg value="test.server.scheme=${cg.web.server.scheme}" />
<arg value="-J" /> <arg value="test.server.port=${cg.web.server.port}" />
</exec>
</target>
<!-- Help -->
<target name="help">
<echo>
************************ HELP ************************
The following target exist, in order of utility/frequency of use:
*** General ***
help - this target
validate - validate your OS/build environment
*** Build Lifecyle ***
compile - compile everything
clean - clean build artifacts
test - run unit tests
install - compile test and install to Maven Repo or protected system library directories
install-no-tests - compile and install skipping tests
*** Revision Control ***
update - update projects
status - get GIT status
commit - commit all changes
tag - tag most projects
*** Deployment Lifecyle ***
deploy - deploy webapps to Tomcat; deploy robot to SEQUENCELOGICHOME
deploy-restart - deploy and restart Tomcat
deploy-test - run functional/load tests post deploy
restart - restart tomcat and robot
functional-test - run web service functional tests
</echo>
</target>
</project>