mirror of
https://github.com/moparisthebest/JdbcMapper
synced 2024-11-25 18:32:18 -05:00
322 lines
15 KiB
XML
322 lines
15 KiB
XML
|
<?xml version="1.0"?>
|
||
|
|
||
|
<!--
|
||
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||
|
contributor license agreements. See the NOTICE file distributed with
|
||
|
this work for additional information regarding copyright ownership.
|
||
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
||
|
(the "License"); you may not use this file except in compliance with
|
||
|
the License. You may obtain a copy of the License at
|
||
|
|
||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
|
||
|
Unless required by applicable law or agreed to in writing, software
|
||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
See the License for the specific language governing permissions and
|
||
|
limitations under the License.
|
||
|
|
||
|
$Header:$
|
||
|
-->
|
||
|
|
||
|
<project name="Beehive/Main" default="usage" basedir=".">
|
||
|
|
||
|
<import file="beehive-imports.xml"/>
|
||
|
|
||
|
<!-- Local properties used to specify the installers and the directories into which they should be installed -->
|
||
|
<property name="beehive.installed.dir" location="${beehive.home}/installed"/>
|
||
|
<property name="jsr173-bundle.name" value="jsr173_1.0_api_bundle.jar"/>
|
||
|
<property name="jsr173.jar" location="${beehive.home}/installed/jsr173/jsr173_1.0_api.jar"/>
|
||
|
|
||
|
<target name="bootstrap" depends="ensure.proxysettings" description="Install external dependencies to the installed/ directory">
|
||
|
<antcall target="install.deps"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Build targets -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="clean" description="Clean Beehive">
|
||
|
<ant dir="controls" target="clean" inheritAll="false"/>
|
||
|
<ant dir="netui" target="clean" inheritAll="false"/>
|
||
|
<ant dir="system-controls" target="clean" inheritAll="false"/>
|
||
|
<ant dir="docs" target="clean" inheritAll="false"/>
|
||
|
|
||
|
<delete dir="${beehive.home}/build"/>
|
||
|
|
||
|
<!-- remove the old controlhaus/ directory used pre Beehive 1.0 to sync
|
||
|
the system controls from http://svn.controlhaus.org.
|
||
|
|
||
|
eventually, we should remove this step.
|
||
|
-->
|
||
|
<delete dir="${beehive.home}/controlhaus" quiet="true" failonerror="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="deploy" description="Deploy Beehive" depends="revision.label">
|
||
|
<ant dir="controls" target="build" inheritAll="false"/>
|
||
|
<ant dir="netui" target="deploy" inheritAll="false"/>
|
||
|
<ant dir="system-controls" target="build" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="build.samples" description="Build the Beehive samples">
|
||
|
<ant antfile="samples/build.xml" target="build" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="clean.samples" description="Clean the Beehive samples">
|
||
|
<ant antfile="samples/build.xml" target="clean" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="revision.label" unless="no.network" description="Creates svn revision label file">
|
||
|
<mkdir dir="${beehive.home}/build"/>
|
||
|
<exec executable="svnversion" outputproperty="svn.revision" failifexecutionfails="false">
|
||
|
<arg value="."/>
|
||
|
</exec>
|
||
|
<echo message="Apache Beehive svn revision #${svn.revision}" file="${beehive.home}/build/svn.rev"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="scrub" description="Scrub the Beehive directory of downloaded files">
|
||
|
<delete dir="installed"/>
|
||
|
<antcall target="clean"/>
|
||
|
<antcall target="clean.samples"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="maven2.install" description="Install the Beehive resources in the Maven repository">
|
||
|
<ant dir="maven" target="clean.m2" inheritAll="false"/>
|
||
|
<ant dir="maven" target="build.m2" inheritAll="false"/>
|
||
|
<ant dir="maven" target="install.m2" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Test targets -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="drt" description="Run the Beehive DRT suite">
|
||
|
<antcall target="controls.drt"/>
|
||
|
<antcall target="netui.drt"/>
|
||
|
<antcall target="systemcontrols.drt"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="controls.drt" description="Run the Beehive/Controls DRT suite">
|
||
|
<ant dir="controls" target="drt" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="netui.drt" description="Run the Beehive/NetUI DRT suite">
|
||
|
<ant dir="netui" antfile="build.xml" target="drt" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="systemcontrols.drt" description="Run the Beehive/System Controls DRT suite">
|
||
|
<ant dir="system-controls" antfile="build.xml" target="drt" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Installation targets. These are used to -->
|
||
|
<!-- install external products that Beehive -->
|
||
|
<!-- depends on to build or test. -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="install.deps" description="Ensure that any external dependencies have been installed locally">
|
||
|
<antcall target="ensure.jsr173"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="uninstall.deps" description="Uninstall the external dependencies">
|
||
|
<delete dir="${beehive.installed.dir}"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- JSR 173 == this is required by XMLBeans and -->
|
||
|
<!-- needs to be downloaded from the net. -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="ensure.jsr173">
|
||
|
<available file="${jsr173.jar}" type="file" property="jsr173.present"/>
|
||
|
<antcall target="get.jsr173"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="get.jsr173" unless="jsr173.present">
|
||
|
<property name="jsr173.installer" location="${beehive.home}/external/xmlbeans/${jsr173-bundle.name}"/>
|
||
|
<echo>JSR 173 API JAR not found in directory: ${beehive.installed.dir}</echo>
|
||
|
<get dest="${jsr173.installer}"
|
||
|
src="http://www.ibiblio.org/maven/xmlbeans/jars/${jsr173-bundle.name}"
|
||
|
verbose="true"
|
||
|
usetimestamp="true"
|
||
|
ignoreerrors="false"/>
|
||
|
<unzip src="${jsr173.installer}" dest="${beehive.installed.dir}/jsr173"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Proxy Setup Targets. -->
|
||
|
<!-- -->
|
||
|
<!-- These settings are used if a proxy needs to -->
|
||
|
<!-- be used when downloading third party software -->
|
||
|
<!-- on which Beehive depends. See BUILDING.txt -->
|
||
|
<!-- for more information. -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="ensure.proxysettings">
|
||
|
<echo>Check to see if proxy setup is required</echo>
|
||
|
|
||
|
<condition property="proxy.needed">
|
||
|
<and>
|
||
|
<isset property="os.PROXYHOST"/>
|
||
|
</and>
|
||
|
</condition>
|
||
|
<condition property="socks.proxy.needed" value="true">
|
||
|
<and>
|
||
|
<isset property="os.SOCKSPROXYHOST"/>
|
||
|
</and>
|
||
|
</condition>
|
||
|
|
||
|
<antcall target="set.proxy"/>
|
||
|
<antcall target="set.socks.proxy"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="set.proxy" if="proxy.needed">
|
||
|
<echo>Proxy setup needed.</echo>
|
||
|
<echo>Proxy host: ${os.PROXYHOST}</echo>
|
||
|
<echo>Proxy port: ${os.PROXYPORT}</echo>
|
||
|
<echo>Proxy user: ${os.PROXYUSER}</echo>
|
||
|
<echo>Proxy password: ${os.PROXYPASSWORD}</echo>
|
||
|
<echo>Non proxy hosts: ${os.NONPROXYHOSTS}</echo>
|
||
|
|
||
|
<setproxy proxyhost="${os.PROXYHOST}"
|
||
|
proxyport="${os.PROXYPORT}"
|
||
|
proxyuser="${os.PROXYUSER}"
|
||
|
proxypassword="${os.PROXYPASSWORD}"
|
||
|
nonproxyhosts="${os.NONPROXYHOSTS}"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="set.socks.proxy" if="socks.proxy.needed">
|
||
|
<echo>Socks Proxy setup needed.</echo>
|
||
|
<setproxy socksproxyhost="${os.SOCKSPROXYHOST}" socksproxyport="${os.SOCKSPROXYPORT}"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Documentation targets -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="docs" description="Generate the Beehive documentation">
|
||
|
<echo>Ensuring Forrest present in directory: ${forrest.dir}</echo>
|
||
|
<available file="${forrest.dir}" type="dir" property="forrest.present"/>
|
||
|
<fail unless="forrest.present" message="You must have Apache Forrest installed to execute this target. For more information, see trunk/BUILDING.TXT"/>
|
||
|
|
||
|
<ant dir="docs" target="build.release"/>
|
||
|
|
||
|
<ant dir="controls" target="docs" inheritAll="false"/>
|
||
|
<ant dir="netui" target="docs" inheritAll="false"/>
|
||
|
<ant dir="system-controls" target="docs" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="build.release.docs" description="Build the documentation for the release represented by this source root">
|
||
|
<ant antfile="distribution.xml" target="build.release.docs"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Distribution targets -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="clean.dist" description="Clean the Beehive distribution directories">
|
||
|
<ant antfile="distribution.xml" target="clean.dist" inheritAll="false"/>
|
||
|
</target>
|
||
|
<target name="build.dist" description="Build the Beehive Binary distribution directory">
|
||
|
<ant antfile="distribution.xml" target="build.dist" inheritAll="false"/>
|
||
|
</target>
|
||
|
<target name="build.dist.lib" description="Build the Beehive Library distribution directory">
|
||
|
<ant antfile="distribution.xml" target="build.dist.lib" inheritAll="false"/>
|
||
|
</target>
|
||
|
<target name="build.dist.src" description="Build the Beehive Source distribution directory">
|
||
|
<ant antfile="distribution.xml" target="build.dist.src" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="build.dist.archives" description="Create all Beehive distribution archives">
|
||
|
<ant antfile="distribution.xml" target="build.dist.archives" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="build.dist.full" description="Cleans/Builds/Bundles the full Beehive distribution archives (does not run tests though).">
|
||
|
<antcall target="clean"/>
|
||
|
<antcall target="deploy"/>
|
||
|
<antcall target="build.dist"/>
|
||
|
<antcall target="build.dist.lib"/>
|
||
|
<antcall target="build.dist.src"/>
|
||
|
<antcall target="build.dist.archives"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="rat" description="Run RAT on the distribution packages">
|
||
|
<ant antfile="distribution.xml" target="rat" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- consider getting rid of this one too, since run.test.dist does this too -->
|
||
|
<target name="build.test.dist" description="Build the Beehive Distribution Tests">
|
||
|
<ant antfile="distribution.xml" target="build.test.dist" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<target name="run.test.dist" description="Run the Beehive Distribution Tests against the distribution archives">
|
||
|
<ant antfile="distribution.xml" target="run.test.dist" inheritAll="false"/>
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Distribution targets -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="create.web.project" description="Create a Beehive-enabled web project">
|
||
|
<fail unless="webapp.dir" message="The ${webapp.dir} property is unset"/>
|
||
|
|
||
|
<mkdir dir="${webapp.dir}"/>
|
||
|
|
||
|
</target>
|
||
|
|
||
|
<!-- ============================================= -->
|
||
|
<!-- -->
|
||
|
<!-- Environment sanity check. Use this if you -->
|
||
|
<!-- experience problems running Beehive build -->
|
||
|
<!-- or tests. -->
|
||
|
<!-- -->
|
||
|
<!-- ============================================= -->
|
||
|
<target name="check.setup" description="Verifies that you have the prerequisites for building Beehive.">
|
||
|
<echo>
|
||
|
java.home = ${java.home}
|
||
|
ant.home = ${ant.home}
|
||
|
beehive.home = ${beehive.home}
|
||
|
beehive.version = ${beehive.version}
|
||
|
</echo>
|
||
|
|
||
|
<available file="${jsr173.jar}" type="file" property="jsr173.available"/>
|
||
|
<fail unless="jsr173.available" message="The JSR 173 JAR does not appear to be installed. Be sure to run "ant bootstrap"."/>
|
||
|
<echo>JSR 173 is installed correctly as ${jsr173.jar}</echo>
|
||
|
|
||
|
<!-- check to see if the JUnit classes are available -->
|
||
|
<available classname="junit.framework.TestCase" property="junit.available"/>
|
||
|
<fail unless="junit.available"
|
||
|
message="The classes in junit.jar do not seem to be available. Please ensure junit.jar is available in ${os.ANT_home}/lib"/>
|
||
|
<echo>junit.jar appears to be available since the class "junit.framework.TestCase" was successfully loaded</echo>
|
||
|
|
||
|
|
||
|
<!-- note, to ease the transition when removing Tomcat from the build, this will check a hard reference to CATALINA_HOME -->
|
||
|
<available file="${os.CATALINA_HOME}" type="dir" property="tomcat.available"/>
|
||
|
<fail unless="tomcat.available"
|
||
|
message="The directory ${os.CATALINA_HOME} does not appear to be available. Please define CATALINA_HOME"/>
|
||
|
<echo>Tomcat appears to be available in ${os.CATALINA_HOME}</echo>
|
||
|
|
||
|
<!-- note, to ease the transition when removing Tomcat from the build, this will check a hard reference to CATALINA_HOME -->
|
||
|
<loadfile srcFile="${os.CATALINA_HOME}/conf/tomcat-users.xml" property="tomcat.users.file" failOnError="true"/>
|
||
|
<condition property="tomcat.manager.defined">
|
||
|
<and>
|
||
|
<contains string="${tomcat.users.file}" substring="rolename="manager""/>
|
||
|
<contains string="${tomcat.users.file}" substring="username="manager""/>
|
||
|
<contains string="${tomcat.users.file}" substring="password="manager""/>
|
||
|
</and>
|
||
|
</condition>
|
||
|
<fail unless="tomcat.manager.defined"
|
||
|
message="The manager role may not be defined in ${os.CATALINA_HOME}/conf/tomcat-users.xml. Please ensure that there is a manager role defined with username/password of manager/manager"/>
|
||
|
<echo>manager role appears to be defined in ${os.CATALINA_HOME}/conf/tomcat-users.xml</echo>
|
||
|
</target>
|
||
|
|
||
|
</project>
|