vivo/build.xml
2010-03-24 20:06:48 +00:00

129 lines
4.3 KiB
XML

<?xml version="1.0"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- ======================================================================
Build script for the VIVOweb product.
The deploy.properties file contains both build properties and runtime
properties.
The required build properties are:
vitroCore.dir
tomcat.home
webapp.name
====================================================================== -->
<project name="vivoweb" default="describe">
<!--
Load the properties from deploy.properties.
-->
<property name="deploy.properties.file" location="deploy.properties" />
<fail message="You must create a &quot;${deploy.properties.file}&quot; file.">
<condition>
<not>
<available file="${deploy.properties.file}" />
</not>
</condition>
</fail>
<property file="${deploy.properties.file}" />
<fail unless="vitro.core.dir"
message="${deploy.properties.file} must contain a value for vitro.core.dir" />
<!--
Override the default location for project modifications.
-->
<property name="product.modifications.dir" location="./productMods" />
<!--
Set this property so the core themes will not be included in the build.
-->
<property name="skip.core.themes" value="true" />
<!--
Now get the standard product-build file.
-->
<import file="${vitro.core.dir}/webapp/product-build.xml" />
<!-- =================================
target: acceptance
Hudson (continuous integration)
uses this to run the acceptance
tests.
================================= -->
<target name="acceptance" description="--> Run the acceptance tests">
<property name="acceptance.properties.file"
location="utilities/acceptance-tests/script/acceptance_test.properties" />
<fail message="You must create a &quot;${acceptance.properties.file}&quot; file.">
<condition>
<not>
<available file="${acceptance.properties.file}" />
</not>
</condition>
</fail>
<property name="acceptance.script.directory" location="utilities/acceptance-tests/script" />
<exec executable="ruby" dir="${acceptance.script.directory}" failonerror="true">
<arg value="run_acceptance_tests.rb" />
<arg value="${acceptance.properties.file}" />
<redirector outputproperty="acceptance.test.output" alwayslog="true" />
</exec>
<fail message="Errors were detected in the console output from the acceptance tests.">
<condition>
<or>
<contains string="${acceptance.test.output}"
substring="error"
casesensitive="false" />
<contains string="${acceptance.test.output}"
substring="exception"
casesensitive="false" />
</or>
</condition>
</fail>
<exec executable="ruby" dir="${acceptance.script.directory}" failonerror="true">
<arg value="output_manager.rb" />
<arg value="${acceptance.properties.file}" />
</exec>
</target>
<!-- =================================
target: licenser
Hudson (continuous integration)
uses this to check that all
appropriate files have license tags.
================================= -->
<target name="licenser" description="--> Check licensing tags">
<property name="licenser.script.directory" location="utilities/release-tools" />
<property name="licenser.properties.file"
location="${licenser.script.directory}/licenser.properties" />
<fail message="You must create a &quot;${licenser.properties.file}&quot; file.">
<condition>
<not>
<available file="${licenser.properties.file}" />
</not>
</condition>
</fail>
<exec executable="ruby" dir="${licenser.script.directory}" failonerror="true">
<arg value="licenser.rb" />
<arg value="${licenser.properties.file}" />
<redirector outputproperty="licenser.test.output" alwayslog="true" />
</exec>
<fail message="Errors were detected in the console output from the licenser.">
<condition>
<contains string="${licenser.test.output}"
substring="WARN: Found no license tag"
casesensitive="false" />
</condition>
</fail>
</target>
</project>