build.xml revision 26012cad471d26ccddc2ab75543a69d439258c01
869N/A<!--
869N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
869N/A
869N/A Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
869N/A
869N/A The contents of this file are subject to the terms
869N/A of the Common Development and Distribution License
869N/A (the License). You may not use this file except in
869N/A compliance with the License.
869N/A
869N/A You can obtain a copy of the License at
869N/A https://opensso.dev.java.net/public/CDDLv1.0.html or
869N/A opensso/legal/CDDLv1.0.txt
869N/A See the License for the specific language governing
869N/A permission and limitations under the License.
869N/A
869N/A When distributing Covered Code, include this CDDL
873N/A Header Notice in each file and include the License file
869N/A at opensso/legal/CDDLv1.0.txt.
869N/A If applicable, add the following below the CDDL Header,
869N/A with the fields enclosed by brackets [] replaced by
869N/A your own identifying information:
5005N/A "Portions Copyrighted [year] [name of copyright owner]"
5755N/A
5934N/A $Id: build.xml,v 1.24 2010/02/05 00:56:01 leiming Exp $
869N/A
869N/A Portions Copyrighted 2010-2015 ForgeRock AS.
0N/A-->
0N/A
0N/A<project name="open-source-web-agents" default="usage">
0N/A
869N/A <description>Open Web Single Sign-On Web Agents</description>
0N/A
0N/A <!-- overridable properties -->
0N/A <!-- build.debug is used for c code. valid values are: optimize, full -->
869N/A <property name="build.debug" value="optimize"/>
0N/A <property name="webagents.base.dir" value="."/>
869N/A <property name="prd.nightly.dist.dir" value="dist"/>
0N/A <property name="target.jdk.set" value="1.6"/>
869N/A <property name="build.sysclasspath" value="ignore"/>
869N/A <import file="webagents.xml" />
869N/A
2624N/A <tstamp>
869N/A <format property="nightly.date" pattern="yyyyMMdd" />
48N/A </tstamp>
869N/A
0N/A <condition property="build.os" value="Linux">
869N/A <os name="linux"/>
716N/A </condition>
869N/A
1958N/A <condition property="build.os" value="SunOS_sparc">
1963N/A <and>
2340N/A <os name="sunos"/>
3103N/A <and>
3127N/A <os arch="sparc"/>
3679N/A </and>
5244N/A </and>
1954N/A </condition>
1954N/A
1954N/A <condition property="build.os" value="SunOS_x86">
1954N/A <and>
1954N/A <os name="sunos"/>
1954N/A <and>
4306N/A <os arch="x86"/>
4306N/A </and>
4306N/A </and>
1954N/A </condition>
1954N/A
1954N/A <condition property="build.os.ext" value="Linux">
1954N/A <os name="linux"/>
5221N/A </condition>
0N/A
0N/A <condition property="build.os.ext" value="SunOS_i86pc">
869N/A <and>
868N/A <os name="sunos"/>
2624N/A <and>
2693N/A <os arch="x86"/>
2042N/A </and>
4563N/A </and>
5408N/A </condition>
4898N/A
4898N/A <condition property="build.os" value="WINNT">
2980N/A <os family="windows"/>
2963N/A </condition>
1503N/A
2915N/A <condition property="build.os" value="HP-UX">
869N/A <os name="hp-ux"/>
2624N/A </condition>
2624N/A
0N/A <condition property="build.os" value="AIX">
2270N/A <os name="aix"/>
2270N/A </condition>
2270N/A
2270N/A <condition property="build.os" value="MacOSX">
2270N/A <and>
2270N/A <os family="mac"/>
2270N/A <os family="unix"/>
0N/A </and>
869N/A </condition>
868N/A
0N/A <condition property="iis.build.ok" value="true">
0N/A <os family="windows"/>
65N/A </condition>
869N/A
868N/A <condition property="winnt.lib.ext" value="_64" else="">
65N/A <os family="windows" arch="amd64"/>
869N/A </condition>
2624N/A
2624N/A <condition property="winnt.ext" value="_x64" else="">
65N/A <os family="windows" arch="amd64"/>
65N/A </condition>
65N/A
65N/A <condition property="build.type.suffix" value="_64" else="">
65N/A <equals arg1="${build.type}" arg2="64"/>
65N/A </condition>
65N/A
65N/A <condition property="build.type.is64Bit" value="1" else="">
65N/A <equals arg1="${build.type}" arg2="64"/>
65N/A </condition>
65N/A
65N/A <condition property="build.type.isDebug" value="1" else="">
65N/A <equals arg1="${DEBUG}" arg2="1"/>
2266N/A </condition>
2266N/A
2266N/A <condition property="target.jdk.set" value="${target.jdk}">
2266N/A <isset property="target.jdk"/>
2266N/A </condition>
2624N/A <condition property="target.jdk.set" value="1.5">
2624N/A <not>
2266N/A <isset property="target.jdk"/>
2266N/A </not>
2624N/A </condition>
2266N/A
2266N/A <!-- agent version number appended to end of agent zip file name -->
2266N/A <property name="agentversion" value="4.0.0-SNAPSHOT"/>
2266N/A
2266N/A <target name="clean">
2266N/A <antcall target="cleandispatch" />
2266N/A <antcall target="cleandistribution" />
2266N/A </target>
2266N/A
2266N/A <target name="cleandispatch">
2266N/A <echo message="Dispatch to clean"/>
2266N/A <exec executable="gmake" failonerror="true">
2266N/A <arg value="clean" />
2266N/A </exec>
2266N/A </target>
2266N/A
2266N/A <target name="cleandistribution">
2266N/A <echo message="Remove product distribution folder"/>
2266N/A <delete dir="${prd.nightly.dist.dir}"/>
2266N/A </target>
2266N/A
2266N/A <target name="all">
2266N/A <antcall target="apache22" />
2266N/A <antcall target="postNightlyBuildStep" inheritRefs="true"/>
2266N/A <antcall target="apache24" />
0N/A <antcall target="postNightlyBuildStep" inheritRefs="true"/>
869N/A <!-- <antcall target="varnish" /> -->
868N/A </target>
0N/A
0N/A <target name="sjsws">
0N/A <echo message="Dispatch to SJSWS"/>
0N/A <property name="containername" value="sjsws"/>
0N/A <antcall target="gmake" inheritRefs="true"/>
2334N/A <ant antfile="${webagents.basedir}/build_agent.xml"
0N/A target="all" inheritRefs="true"/>
2624N/A </target>
2624N/A
0N/A <target name="apache22">
0N/A <echo message="Dispatch to Apache 22"/>
869N/A <property name="containername" value="apache22zip"/>
868N/A <antcall target="gmake" inheritRefs="true"/>
0N/A </target>
0N/A
869N/A <target name="apache24">
0N/A <echo message="Dispatch to Apache 24"/>
0N/A <property name="containername" value="apachezip"/>
2624N/A <antcall target="gmake" inheritRefs="true"/>
2624N/A </target>
2624N/A
869N/A <target name="check.build.varnish">
2624N/A <condition property="build.varnish">
2624N/A <and>
2624N/A <os name="linux"/>
2624N/A <equals arg1="${build.type}" arg2="64"/>
2624N/A </and>
2624N/A </condition>
2624N/A </target>
2624N/A
5400N/A <target name="varnish" depends="check.build.varnish" if="build.varnish">
2624N/A <echo message="Dispatch to Varnish"/>
2624N/A <property name="containername" value="varnish"/>
2624N/A <antcall target="gmake" inheritRefs="true"/>
2624N/A <ant antfile="${webagents.basedir}/build_agent.xml"
4457N/A target="varnish" inheritRefs="true"/>
2624N/A </target>
2624N/A
5268N/A <target name="iis6" if="iis.build.ok">
5268N/A <echo message="Dispatch to iis6"/>
5268N/A <property name="containername" value="iis6"/>
5191N/A <antcall target="gmake" inheritRefs="true"/>
5667N/A <ant antfile="${webagents.basedir}/build_agent.xml"
2624N/A target="all" inheritRefs="true"/>
2624N/A </target>
5191N/A
2624N/A <target name="iis7" if="iis.build.ok">
5203N/A <echo message="Dispatch to iis7"/>
5203N/A <property name="containername" value="iis7"/>
0N/A <antcall target="gmake" inheritRefs="true"/>
0N/A <ant antfile="${webagents.basedir}/build_agent.xml"
869N/A target="all" inheritRefs="true"/>
868N/A </target>
0N/A
0N/A <target name="gmake">
2624N/A <echo message="Dispatch to compile of agent c code"/>
848N/A <exec executable="gmake" failonerror="true">
2624N/A <arg value="64=${build.type.is64Bit}" />
2624N/A <arg value="DEBUG=${build.type.isDebug}" />
868N/A <arg value="${containername}" />
848N/A </exec>
2624N/A </target>
0N/A
2624N/A <target name="upgradesvn">
2624N/A <echo message="Run 'svn upgrade' so 'svn info' won't fail horribly because of 'working copy is too old' messages"/>
0N/A <exec executable="svn" failonerror="true">
0N/A <arg value="upgrade" />
868N/A </exec>
2624N/A </target>
2222N/A
2624N/A <target name="nightly">
2624N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
2222N/A </echo>
2222N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
5161N/A </echo>
5161N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/IIS-v6-${build.os}-${build.type}-build_date.js" append="false">var iis_v6_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
5161N/A </echo>
5161N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/IIS-v7-${build.os}-${build.type}-build_date.js" append="false">var iis_v7_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
5161N/A </echo>
5161N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/SJSWS-v7.0-${build.os}-${build.type}-build_date.js" append="false">var sjsws_v70_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
2624N/A </echo>
2222N/A <echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Varnish-v3.0.3-${build.os}-${build.type}-build_date.js" append="false">var varnish_v303_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
2624N/A </echo>
2624N/A <antcall target="all" inheritRefs="true"/>
2222N/A<!--
2222N/A <copy file="${webagents.docs.dir}/nightly.html"
2624N/A tofile="${webagents.dist.dir}/index.html" filtering="true" />
868N/A-->
2624N/A </target>
2624N/A
115N/A <target name="postNightlyBuildStep">
868N/A <copy todir="${prd.nightly.dist.dir}/webagents/${nightly.date}">
868N/A <fileset dir="${webagents.built.dir}" >
2624N/A <include name="*.zip"/>
868N/A </fileset>
2624N/A </copy>
2624N/A </target>
868N/A
868N/A <target name="usage">
868N/A <echo message=" "/>
2624N/A <echo message=" Following targets are available for Web Agents:"/>
868N/A <echo message=" "/>
2624N/A <echo message=" all : builds all the Web agents"/>
2624N/A <echo message=" clean : deletes all the generated files"/>
868N/A <echo message=" upgradesvn : this is a fudge to avoid 'workspace is too old' messages when 'svn info' is run"/>
868N/A <echo message=" sjsws : builds the Sun Java System Web Server 6.1/7.0 agent"/>
2624N/A <echo message=" apache22 : builds the Apache Web Server 2.2.x agent"/>
868N/A <echo message=" apache24 : builds the Apache Web Server 2.4.x agent"/>
2624N/A <echo message=" iis6 : builds the Microsoft Internet Information Services 6 agent"/>
2624N/A <echo message=" iis7 : builds the Microsoft Internet Information Services 7 agent"/>
868N/A <echo message=" varnish : builds the Varnish Cache Server 3.0.3 agent"/>
868N/A <echo message=" usage : displays this usage message"/>
2624N/A <echo message=" "/>
868N/A <echo message=" To run a target, issue the following command:"/>
2624N/A <echo message=" "/>
2624N/A <echo message=" ant &lt;target-name&gt;"/>
868N/A <echo message=" "/>
868N/A </target>
868N/A
2624N/A</project>
868N/A