JdbcMapper/beehive-imports.xml

389 lines
14 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:$
-->
<!--
A build file that needs to be imported by all sub-projects.
-->
<project name="beehive-imports" default="" basedir=".">
<property environment="os"/>
<dirname property="beehive.home" file="${ant.file.beehive-imports}"/>
<property name="ant.dir" location="${os.ANT_HOME}"/>
<property name="forrest.dir" location="${os.FORREST_HOME}"/>
<property name="beehive.version" value="1.0.2"/>
<property name="dist.base.name" value="apache-beehive-"/>
<property name="dist.name" value="${dist.base.name}${beehive.version}"/>
<property name="webservice.runtime" value="axis"/>
<property name="servlet.runtime" value="tomcat"/>
<property name="maven.groupId" value="org/apache/beehive"/>
<property name="build.m2.dir" value="${beehive.home}/build/maven/m2/${maven.groupId}"/>
<property name="build.m1.dir" value="${beehive.home}/build/maven/m1/beehive"/>
<!-- TODO: move the MyFaces jars up into trunk/external -->
<property name="myfaces.dir" location="${beehive.home}/netui/external/jsf/myfaces-1.0.9/lib"/>
<!-- ======================================================================== -->
<!-- Common Beehive paths -->
<!-- ======================================================================== -->
<fileset id="controls.fileset" file="${beehive.home}/controls/build/jars/beehive-controls.jar"/>
<fileset id="system-controls.fileset" dir="${beehive.home}/system-controls/build/jars">
<include name="beehive-jdbc-control.jar"/>
<include name="beehive-jms-control.jar"/>
<include name="beehive-ejb-control.jar"/>
</fileset>
<fileset id="velocity.fileset" dir="${beehive.home}/external/velocity">
<include name="velocity-dep-1.4.jar"/>
</fileset>
<fileset id="commons-codec.fileset" file="${beehive.home}/external/commons/commons-codec-1.3.jar"/>
<fileset id="commons-discovery.fileset" file="${beehive.home}/external/commons/commons-discovery-0.2.jar"/>
<fileset id="derby.fileset" file="${beehive.home}/external/derby/derby_46005.jar"/>
<!-- create a patternset for commons-logging so we can refer to the filename of the jar -->
<patternset id="commons-logging.patternset">
<include name="commons-logging-1.0.4.jar" />
</patternset>
<fileset id="commons-logging.fileset" dir="${beehive.home}/external/commons">
<patternset refid="commons-logging.patternset" />
</fileset>
<fileset id="log4j.fileset" file="${beehive.home}/external/log4j/log4j-1.2.8.jar"/>
<fileset id="xbean.fileset" file="${beehive.home}/external/xmlbeans/apache-xbean.jar"/>
<fileset id="jsr173.fileset" file="${beehive.home}/installed/jsr173/jsr173_1.0_api.jar"/>
<path id="controls.dependency.path">
<pathelement location="${beehive.home}/controls/build/jars/beehive-controls.jar"/>
</path>
<path id="netui-compiler.dependency.path">
<pathelement location="${beehive.home}/netui/build/jars/beehive-netui-compiler.jar"/>
</path>
<path id="velocity.dependency.path">
<fileset refid="velocity.fileset"/>
</path>
<path id="xbean.dependency.path">
<fileset refid="xbean.fileset"/>
<fileset refid="jsr173.fileset"/>
</path>
<path id="commons-codec.dependency.path">
<fileset refid="commons-codec.fileset"/>
</path>
<path id="commons-discovery.dependency.path">
<fileset refid="commons-discovery.fileset"/>
</path>
<path id="derby.dependency.path">
<fileset refid="derby.fileset"/>
</path>
<path id="commons-logging.dependency.path">
<fileset refid="commons-logging.fileset"/>
</path>
<path id="log4j.dependency.path">
<fileset refid="log4j.fileset"/>
</path>
<path id="servlet.dependency.path">
<pathelement location="${beehive.home}/external/servlet/servlet-api-2.4.jar"/>
<pathelement location="${beehive.home}/external/servlet/jsp-api-2.0.jar"/>
</path>
<path id="tools.dependency.path">
<pathelement location="${os.JAVA_HOME}/lib/tools.jar"/>
</path>
<path id="ant-all.dependency.path">
<fileset dir="${ant.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="ant-jar.dependency.path">
<fileset file="${ant.home}/lib/ant.jar"/>
</path>
<!-- test classpaths-->
<path id="junit.dependency.path">
<pathelement location="${beehive.home}/external/junit/junit.jar"/>
</path>
<!-- controls test classpaths; these should move down into the controls/test/external directory -->
<path id="regexp.dependency.path">
<pathelement location="${beehive.home}/external/jakarta/jakarta-regexp-1.2.jar"/>
</path>
<path id="httpunit.dependency.path">
<pathelement location="${beehive.home}/external/httpunit/httpunit.jar"/>
<pathelement location="${beehive.home}/external/httpunit/nekohtml.jar"/>
<pathelement location="${beehive.home}/external/httpunit/xercesImpl.jar"/>
</path>
<path id="beehive-antext.dependency.path">
<pathelement location="${beehive.home}/external/beehive-antext/beehive-antext.jar"/>
</path>
<!-- ======================================================================== -->
<!-- Common Beehive Ant macros -->
<!-- ======================================================================== -->
<macrodef name="echo-fileset">
<attribute name="filesetref" />
<sequential>
<pathconvert pathsep="${line.separator}" property="@{filesetref}.echopath" refid="@{filesetref}"/>
<echo> ------- echoing fileset @{filesetref} -------</echo>
<echo>${@{filesetref}.echopath}</echo>
</sequential>
</macrodef>
<macrodef name="copy-junit">
<attribute name="todir"/>
<sequential>
<copy todir="@{todir}">
<fileset file="${beehive.home}/external/junit/junit.jar"/>
</copy>
</sequential>
</macrodef>
<macrodef name="copy-log4j">
<attribute name="todir"/>
<sequential>
<copy todir="@{todir}">
<fileset refid="log4j.fileset"/>
</copy>
</sequential>
</macrodef>
<macrodef name="copy-xbean">
<attribute name="todir"/>
<sequential>
<copy todir="@{todir}">
<fileset refid="xbean.fileset"/>
</copy>
</sequential>
</macrodef>
<macrodef name="copy-controls">
<attribute name="todir"/>
<sequential>
<copy todir="@{todir}">
<fileset refid="controls.fileset"/>
<fileset refid="velocity.fileset"/>
<fileset refid="commons-discovery.fileset"/>
</copy>
</sequential>
</macrodef>
<macrodef name="deploy-netui">
<attribute name="webappDir"/>
<sequential>
<echo>Deploy NetUI to webapp @{webappDir}</echo>
<ant dir="${beehive.home}/ant/" antfile="beehive-runtime.xml" target="deploy.beehive.webapp.runtime" inheritAll="false">
<property name="webapp.dir" location="@{webappDir}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="deploy-controls">
<attribute name="destDir"/>
<sequential>
<echo>Deploy Controls to directory @{destDir}</echo>
<ant dir="${beehive.home}/ant" antfile="beehive-runtime.xml" target="deploy.controls.webapp.runtime" inheritAll="false">
<property name="dest.dir" location="@{destDir}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="deploy-webapp">
<attribute name="webappDir"/>
<attribute name="contextPath"/>
<sequential>
<ant dir="${beehive.home}/ant" antfile="${servlet.runtime}-imports.xml" target="deploy" inheritAll="false">
<property name="webapp.dir" location="@{webappDir}"/>
<property name="context.path" value="@{contextPath}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="undeploy-webapp">
<attribute name="contextPath"/>
<sequential>
<ant dir="${beehive.home}/ant" antfile="${servlet.runtime}-imports.xml" target="undeploy" inheritAll="false">
<property name="context.path" value="@{contextPath}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="redeploy-webapp">
<attribute name="contextPath"/>
<sequential>
<ant dir="${beehive.home}/ant" antfile="${servlet.runtime}-imports.xml" target="redeploy" inheritAll="false">
<property name="context.path" value="@{contextPath}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="start-server">
<attribute name="shmem"/>
<attribute name="javaOptions"/>
<sequential>
<!-- if shmem, set target to "start.shmem" -->
<condition property="start.target" value="start.with.shmem">
<istrue value="@{shmem}"/>
</condition>
<condition property="start.target" value="start">
<isfalse value="@{shmem}"/>
</condition>
<ant dir="${beehive.home}/ant" antfile="${servlet.runtime}-imports.xml" target="${start.target}" inheritAll="false">
<property name="java.options" value="@{javaOptions}"/>
</ant>
</sequential>
</macrodef>
<macrodef name="stop-server">
<sequential>
<ant dir="${beehive.home}/ant" antfile="${servlet.runtime}-imports.xml" target="stop" inheritAll="false"/>
</sequential>
</macrodef>
<macrodef name="build-xbean">
<attribute name="schemaDir"/>
<attribute name="classgenDir"/>
<attribute name="source" default="1.5"/>
<attribute name="xbeanBuildClasspathRef" default="xbean.dependency.path"/>
<sequential>
<property name="curr.classpath" refid="@{xbeanBuildClasspathRef}"/>
<echo>XMLBean build classpath: ${curr.classpath}</echo>
<taskdef name="xmlbeanbuild"
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpathref="xbean.dependency.path"/>
<xmlbeanbuild
schema="@{schemaDir}"
classgendir="@{classgenDir}"
failonerror="true"
source="@{source}"
classpathref="@{xbeanBuildClasspathRef}"/>
</sequential>
</macrodef>
<!-- ======================================================================== -->
<!-- Common Beehive tasks -->
<!-- ======================================================================== -->
<taskdef name="gethostname"
classname="org.apache.beehive.test.tools.antext.GetHostName"
classpathref="beehive-antext.dependency.path"/>
<!-- ======================================================================== -->
<!-- Verify JDK version -->
<!-- ======================================================================== -->
<condition property="jdk.version.okay">
<or>
<contains string="${java.version}" substring="1.5"/>
<contains string="${java.version}" substring="1.6"/>
<contains string="${java.version}" substring="1.7"/>
<contains string="${java.version}" substring="1.8"/>
</or>
</condition>
<fail unless="jdk.version.okay">
Newer JDK required.
Building the project requires JDK 1.5 or newer.
You are currently using the following JDK:
java.home = ${java.home}
java.version = ${java.version}
java.vendor = ${java.vendor}
You may obtain a newer version of the JDK from
http://java.sun.com/
If you have JDK ${required.jdk.version} installed on your system, you may need to
adjust your JAVA_HOME environment variable.
</fail>
<!-- ======================================================================== -->
<!-- Verify ANT version -->
<!-- ======================================================================== -->
<condition property="ant.version.okay">
<or>
<!-- allow ant 1.7 for gump runs -->
<contains string="${ant.version}" substring="1.6"/>
<contains string="${ant.version}" substring="1.7"/>
<contains string="${ant.version}" substring="1.8"/>
</or>
</condition>
<fail unless="ant.version.okay">
Newer Ant required.
Building the project required Apache Ant 1.6.
You are currently using the following apache-ant:
ant.home = ${ant.home}
ant.version = ${ant.version}
You may obtain a newer version of ant from
http://ant.apache.org/
If you have Ant 1.6 installed on your system, you may need to
adjust your ANT_HOME environment variable.
</fail>
<mkdir dir="${beehive.home}/build/lib/"/>
<!-- ======================================================================== -->
<!-- Common targets -->
<!-- ======================================================================== -->
<target name="usage" description="Print the usage for this build.xml">
<java fork="no" classname="org.apache.tools.ant.Main">
<arg line="-f ${ant.file} -projecthelp"/>
</java>
</target>
</project>