Author: kwright
Date: Fri Mar 21 14:36:23 2014
New Revision: 1579946
URL: http://svn.apache.org/r1579946
Log:
Deliver connector-build ant file as part of distribution
Added:
manifoldcf/branches/CONNECTORS-912/framework/buildfiles/
manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
(with props)
Modified:
manifoldcf/branches/CONNECTORS-912/build.xml
manifoldcf/branches/CONNECTORS-912/framework/build.xml
Modified: manifoldcf/branches/CONNECTORS-912/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/build.xml?rev=1579946&r1=1579945&r2=1579946&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-912/build.xml Fri Mar 21 14:36:23 2014
@@ -1202,6 +1202,12 @@
</target>
<target name="deliver-framework"
depends="preclean-for-delivery,build-framework" if="downloaded">
+ <mkdir dir="dist"/>
+ <copy todir="dist">
+ <fileset dir="framework/dist">
+ <include name="connector-build.xml"/>
+ </fileset>
+ </copy>
<mkdir dir="dist/web"/>
<copy todir="dist/web">
<fileset dir="framework/dist/web"/>
Modified: manifoldcf/branches/CONNECTORS-912/framework/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/framework/build.xml?rev=1579946&r1=1579945&r2=1579946&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/framework/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-912/framework/build.xml Fri Mar 21 14:36:23
2014
@@ -17,8 +17,6 @@
<project default="all">
- <import file="../common-build.xml"/>
-
<target name="clean">
<delete dir="build"/>
<delete dir="dist"/>
@@ -746,6 +744,13 @@
</copy>
</target>
+ <target name="buildfiles">
+ <mkdir dir="dist"/>
+ <copy todir="dist">
+ <fileset dir="buildfiles"/>
+ </copy>
+ </target>
+
<target name="lib"
depends="jar-core,jar-ui-core,jar-agents,jar-pull-agent,jar-jetty-runner,jar-script-engine">
<mkdir dir="dist/lib"/>
<copy todir="dist/lib">
@@ -1639,7 +1644,7 @@
</java>
</target>
- <target name="build"
depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine"/>
+ <target name="build"
depends="multi-process-zk-example,multi-process-zk-example-proprietary,multi-process-file-example,multi-process-file-example-proprietary,single-process-example,single-process-example-proprietary,example-common,script-engine,buildfiles"/>
<target name="all"
depends="build,doc,build-tests,run-tests,run-tests-derby,run-tests-HSQLDB,run-tests-HSQLDBext"/>
Added:
manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml?rev=1579946&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
(added)
+++ manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
Fri Mar 21 14:36:23 2014
@@ -0,0 +1,891 @@
+<!--
+ 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.
+-->
+
+<project name="mcf-connector-build">
+
+ <import file="../common-build.xml"/>
+
+ <target name="clean">
+ <delete dir="build"/>
+ <delete dir="dist"/>
+ <delete dir="test-derby-output"/>
+ <delete dir="test-postgresql-output"/>
+ <delete dir="test-mysql-output"/>
+ <delete dir="test-HSQLDB-output"/>
+ <delete dir="test-HSQLDBext-output"/>
+ </target>
+
+
+ <path id="mcf-connector-build.connector-classpath">
+ <fileset dir="${mcf-dist}/lib">
+ <include name="json*.jar"/>
+ <include name="commons-codec*.jar"/>
+ <include name="commons-collections*.jar"/>
+ <include name="commons-el*.jar"/>
+ <include name="commons-fileupload*.jar"/>
+ <include name="httpcore*.jar"/>
+ <include name="httpclient*.jar"/>
+ <include name="commons-io*.jar"/>
+ <include name="commons-lang*.jar"/>
+ <include name="commons-logging*.jar"/>
+ <include name="eclipse*.jar"/>
+ <include name="jasper*.jar"/>
+ <include name="jetty*.jar"/>
+ <include name="slf4j*.jar"/>
+ <include name="jsp-2.1*.jar"/>
+ <include name="jsp-api*.jar"/>
+ <include name="junit*.jar"/>
+ <include name="log4j*.jar"/>
+ <include name="serializer*.jar"/>
+ <include name="servlet-api*.jar"/>
+ <include name="tomcat-juli*.jar"/>
+ <include name="xalan*.jar"/>
+ <include name="xercesImpl*.jar"/>
+ <include name="xml-apis*.jar"/>
+ <include name="velocity*.jar"/>
+ </fileset>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="axis*.jar"/>
+ <include name="saaj*.jar"/>
+ <include name="wsdl*.jar"/>
+ <include name="commons-discovery*.jar"/>
+ <include name="activation*.jar"/>
+ </fileset>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="castor*.jar"/>
+ <include name="geronimo-activation_1.1_spec*.jar"/>
+ <include name="geronimo-javamail_1.4_spec*.jar"/>
+ <include name="commons-discovery*.jar"/>
+ </fileset>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="mcf-core.jar"/>
+ <include name="mcf-agents.jar"/>
+ <include name="mcf-pullagent.jar"/>
+ <include name="mcf-ui-core.jar"/>
+ </fileset>
+ <pathelement location="build/stubclasses"/>
+ <pathelement location="build/wsdlclasses"/>
+ <pathelement location="build/xsdclasses"/>
+ <pathelement location="build/interface/classes"/>
+ <pathelement location="build/rmistub/classes"/>
+ </path>
+
+ <path id="connector-classpath">
+ <path refid="mcf-connector-build.connector-classpath"/>
+ </path>
+
+ <path id="mcf-connector-build.connector-test-classpath">
+ <path refid="connector-classpath"/>
+ <pathelement location="build/connector/classes"/>
+ <fileset dir="${mcf-dist}/test-lib"/>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="postgresql*.jar"/>
+ <include name="derby*.jar"/>
+ <include name="hsqldb*.jar"/>
+ </fileset>
+ <fileset dir="${mcf-dist}/lib-proprietary">
+ <include name="mysql*.jar"/>
+ </fileset>
+ </path>
+
+ <path id="connector-test-classpath">
+ <path refid="mcf-connector-build.connector-test-classpath"/>
+ </path>
+
+ <path id="mcf-connector-build.implementation-classpath">
+ <pathelement location="build/interface/classes"/>
+ <pathelement location="build/stubclasses"/>
+ </path>
+
+ <path id="implementation-classpath">
+ <path refid="mcf-connector-build.implementation-classpath"/>
+ </path>
+
+ <path id="mcf-connector-build.interface-classpath">
+ </path>
+
+ <path id="interface-classpath">
+ <path refid="mcf-connector-build.interface-classpath"/>
+ </path>
+
+ <!-- Standard connector proprietary/non-proprietary setup described below.
+ (1) If there's a lib-proprietary directory, we presume that the connector
requires one or
+ more proprietary libraries to build and run. We expect to find a
README.txt file in
+ the directory, which describes what is needed at build time, and that
if the required
+ libraries are not present, the connector's build.xml file will
override "calculate-condition"
+ and "precompile-check" appropriately. If there's a
"proprietary-library-instructions.txt" file,
+ it will be copied to the connector-lib directory with the name
{connector}-README.txt.
+ If the required libraries are not present, the same file will also be
copied to {connector}-PLACEHOLDER.txt.
+ (2) If there's a build-stub directory, we presume that the connector
requires one or
+ more proprietary libraries to run, but can be built without
proprietary libraries through
+ the use of stubs. In this case the connector MAY also have a
+ "proprietary-library-instructions.txt" file, if proprietary libraries
are required at
+ runtime. This file will be copied to the
+ connector-lib directory with the name {connector}-README.txt and to
{connector}-PLACEHOLDER.txt,
+ as a placeholder for the required proprietary libraries.
+
+ A connector can have both a build-stub and a lib-proprietary directory.
In this case,
+ the connector will build against stubs but will deliver proprietary
libraries to
+ connector-lib-proprietary for use at runtime, and the
{connector}-README.txt
+ file will only be delivered to the connector-lib directory.
+ -->
+
+ <target name="calculate-condition">
+ <available file="build.xml" property="build-present"/>
+ </target>
+
+ <target name="calculate-testcode-condition">
+ <available file="connector/src/test/java" property="tests-present"/>
+ </target>
+
+ <target name="calculate-run-condition">
+ <property name="libs-present" value="true"/>
+ </target>
+
+ <target name="precompile-warn" depends="calculate-condition"
unless="build-present"/>
+
+ <target name="pretest-warn" depends="calculate-testcode-condition"
unless="tests-present"/>
+
+ <target name="prerun-warn" depends="calculate-run-condition"
unless="libs-present"/>
+
+
+ <target name="precompile-check" depends="precompile-warn">
+ <condition property="canBuild">
+ <isset property="build-present"/>
+ </condition>
+ </target>
+
+ <target name="pretest-check" depends="precompile-warn,pretest-warn">
+ <condition property="canTest">
+ <and>
+ <isset property="build-present"/>
+ <isset property="tests-present"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="prerun-check" depends="precompile-warn,prerun-warn">
+ <condition property="canRun">
+ <and>
+ <isset property="build-present"/>
+ <isset property="libs-present"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="has-stubs-check" depends="precompile-check" if="canBuild">
+ <available file="build-stub/src/main/java" property="hasStubs"/>
+ </target>
+
+ <target name="has-proprietary-materials-check">
+ </target>
+
+ <target name="build-stubs-check"
depends="has-stubs-check,has-proprietary-materials-check" if="hasStubs">
+ <condition property="buildStubs">
+ <not>
+ <isset property="proprietaryMaterialsAvailable"/>
+ </not>
+ </condition>
+ </target>
+
+ <target name="include-README-lib-proprietary-check"
depends="precompile-check" if="canBuild">
+ <available file="proprietary-library-instructions.txt"
property="includeREADMELibProprietary"/>
+ </target>
+
+ <target name="include-proprietary-instructions-lib-proprietary-check"
depends="prerun-check" unless="canRun">
+ <available file="proprietary-library-instructions.txt"
property="includeProprietaryInstructionsLibProprietary"/>
+ </target>
+
+ <target name="compile-stubs" depends="build-stubs-check" if="buildStubs">
+ <mkdir dir="build/stubclasses"/>
+ <javac srcdir="build-stub/src/main/java" destdir="build/stubclasses"
deprecation="true" target="1.6" source="1.6" debug="true"
debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="has-tests-check" depends="precompile-check" if="canBuild">
+ <available file="connector/src/test/java" property="hasTests"/>
+ </target>
+
+ <target name="has-test-resources-check" depends="has-tests-check"
if="hasTests">
+ <available file="connector/src/test/resources"
property="hasTestResources"/>
+ </target>
+
+ <target name="has-native2ascii-check" depends="precompile-check"
if="canBuild">
+ <available file="connector/src/main/native2ascii"
property="hasNative2Ascii"/>
+ </target>
+
+ <target name="has-resources-check" depends="precompile-check"
if="canBuild">
+ <available file="connector/src/main/resources"
property="hasResources"/>
+ </target>
+
+ <target name="has-RMI-check" depends="precompile-check" if="canBuild">
+ <available file="implementation" property="hasImplementation"/>
+ <available file="interface" property="hasInterface"/>
+ <available file="server" property="hasServer"/>
+ <available file="registry" property="hasRegistry"/>
+ <condition property="hasRMI">
+ <and>
+ <isset property="hasImplementation"/>
+ <isset property="hasInterface"/>
+ <isset property="hasServer"/>
+ <isset property="hasRegistry"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="classcreate-wsdl">
+ <mkdir dir="build/wsdljava"/>
+ <java classname="org.apache.axis.wsdl.WSDL2Java" fork="true">
+ <classpath>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="axis*.jar"/>
+ <include name="saaj*.jar"/>
+ <include name="wsdl*.jar"/>
+ <include name="mail*.jar"/>
+ <include name="activation*.jar"/>
+ <include name="commons-discovery*.jar"/>
+ <include name="commons-logging*.jar"/>
+ </fileset>
+ </classpath>
+ <jvmarg value="-Dfile.encoding=UTF-8"/>
+ <arg value="--timeout"/>
+ <arg value="0"/>
+ <arg value="--noImports"/>
+ <arg value="-o"/>
+ <arg value="build/wsdljava"/>
+ <arg value="${wsdlname}"/>
+ </java>
+ </target>
+
+ <target name="classcreate-xsd">
+ <mkdir dir="build/xsdjava"/>
+ <java classname="org.exolab.castor.builder.SourceGeneratorMain"
fork="true">
+ <classpath>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="castor*.jar"/>
+ <include name="geronimo-activation_1.1_spec*.jar"/>
+ <include name="geronimo-javamail_1.4_spec*.jar"/>
+ <include name="xerces*.jar"/>
+ <include name="commons-logging*.jar"/>
+ </fileset>
+ </classpath>
+ <jvmarg value="-Dfile.encoding=UTF-8"/>
+ <arg value="-i"/>
+ <arg value="${xsdname}"/>
+ <arg value="=f"/>
+ <arg value="-dest"/>
+ <arg value="build/xsdjava"/>
+ <arg value="-package"/>
+ <arg
value="org.apache.manifoldcf.crawler.connectors.${packagename}"/>
+ </java>
+ </target>
+
+ <target name="classcreate-wsdls"/>
+
+ <target name="has-wsdls-check"
depends="classcreate-wsdls,precompile-check" if="canBuild">
+ <available file="build/wsdljava" property="hasWSDLs"/>
+ </target>
+
+ <target name="compile-wsdls" depends="has-wsdls-check" if="hasWSDLs">
+ <mkdir dir="build/wsdlclasses"/>
+ <javac srcdir="build/wsdljava" destdir="build/wsdlclasses"
deprecation="true" target="1.6" source="1.6" debug="true"
debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="axis*.jar"/>
+ <include name="saaj*.jar"/>
+ <include name="wsdl*.jar"/>
+ <include name="activation*.jar"/>
+ <include name="commons-discovery*.jar"/>
+ <include name="commons-logging*.jar"/>
+ </fileset>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="classcreate-xsds"/>
+
+ <target name="has-xsds-check" depends="classcreate-xsds,precompile-check"
if="canBuild">
+ <available file="build/xsdjava" property="hasXSDs"/>
+ </target>
+
+ <target name="compile-xsds" depends="has-xsds-check" if="hasXSDs">
+ <mkdir dir="build/xsdclasses"/>
+ <javac srcdir="build/xsdjava" destdir="build/xsdclasses"
deprecation="true" target="1.6" source="1.6" debug="true"
debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <fileset dir="${mcf-dist}/lib">
+ <include name="castor*.jar"/>
+ </fileset>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="setup-rmic" depends="has-RMI-check" if="hasRMI">
+ <mkdir dir="build/rmijava"/>
+ <copy todir="build/rmijava">
+ <fileset dir="implementation/src/main/java"/>
+ </copy>
+ </target>
+
+ <target name="rmic-build">
+ <rmic base="build/rmijava" classname="${classname}">
+ <classpath>
+ <path refid="implementation-classpath"/>
+ <pathelement location="build/implementation/classes"/>
+ </classpath>
+ </rmic>
+ </target>
+
+ <target name="rmic-build-all"
depends="compile-implementation,compile-interface,setup-rmic,has-RMI-check"
if="hasRMI"/>
+
+ <target name="doc-rmi" depends="compile-wsdls,compile-xsds,has-RMI-check"
if="hasRMI">
+ <mkdir dir="dist/doc"/>
+ <javadoc destdir="dist/doc" source="1.6">
+ <classpath>
+ <path refid="connector-classpath"/>
+ </classpath>
+ <fileset dir="interface/src/main/java" includes="**/*.java"/>
+ <fileset dir="connector/src/main/java" includes="**/*.java"/>
+ </javadoc>
+ </target>
+
+ <target name="doc"
depends="compile-stubs,doc-rmi,compile-wsdls,compile-xsds,has-RMI-check,precompile-check"
if="canBuild" unless="hasRMI">
+ <mkdir dir="dist/doc"/>
+ <javadoc destdir="dist/doc" source="1.6">
+ <classpath>
+ <path refid="connector-classpath"/>
+ </classpath>
+ <fileset dir="connector/src/main/java" includes="**/*.java"/>
+ </javadoc>
+ </target>
+
+ <target name="compile-connector-resources" depends="has-resources-check"
if="hasResources">
+ <mkdir dir="build/connector/classes"/>
+ <copy todir="build/connector/classes">
+ <fileset dir="connector/src/main/resources"/>
+ </copy>
+ </target>
+
+ <target name="compile-connector-native2ascii"
depends="has-native2ascii-check" if="hasNative2Ascii">
+ <mkdir dir="build/connector/classes"/>
+ <native2ascii encoding="UTF-8" src="connector/src/main/native2ascii"
dest="build/connector/classes" includes="**/*.properties" />
+ </target>
+
+ <target name="compile-rmic" depends="rmic-build-all,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/rmiskel/classes"/>
+ <copy todir="build/rmiskel/classes">
+ <fileset dir="build/rmijava">
+ <include name="**/*_Skel.class"/>
+ </fileset>
+ </copy>
+ <mkdir dir="build/rmistub/classes"/>
+ <copy todir="build/rmistub/classes">
+ <fileset dir="build/rmijava">
+ <include name="**/*_Stub.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="compile-server"
depends="compile-interface,compile-implementation,compile-rmic,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/server/classes"/>
+ <javac srcdir="server/src/main/java" destdir="build/server/classes"
deprecation="true" target="1.6" source="1.6" debug="true"
debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <pathelement location="build/interface/classes"/>
+ <pathelement location="build/implementation/classes"/>
+ <pathelement location="build/rmistub/classes"/>
+ <pathelement location="build/rmiskel/classes"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-registry" depends="compile-interface,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/registry/classes"/>
+ <javac srcdir="registry/src/main/java"
destdir="build/registry/classes" deprecation="true" target="1.6" source="1.6"
debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <pathelement location="build/interface/classes"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-connector"
depends="compile-stubs,compile-connector-native2ascii,compile-connector-resources,compile-wsdls,compile-xsds,compile-interface,compile-rmic,precompile-check"
if="canBuild">
+ <mkdir dir="build/connector/classes"/>
+ <javac srcdir="connector/src/main/java"
destdir="build/connector/classes" deprecation="true" target="1.6" source="1.6"
debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <path refid="connector-classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-implementation"
depends="compile-stubs,compile-interface,has-RMI-check" if="hasRMI">
+ <mkdir dir="build/implementation/classes"/>
+ <javac srcdir="implementation/src/main/java"
destdir="build/implementation/classes" deprecation="true" target="1.6"
source="1.6" debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <path refid="implementation-classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-interface" depends="has-RMI-check" if="hasRMI">
+ <mkdir dir="build/interface/classes"/>
+ <javac srcdir="interface/src/main/java"
destdir="build/interface/classes" deprecation="true" target="1.6" source="1.6"
debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <path refid="interface-classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="compile-test-resources" depends="has-test-resources-check"
if="hasTestResources">
+ <mkdir dir="build/connector-test/classes"/>
+ <copy todir="build/connector-test/classes">
+ <fileset dir="connector/src/test/resources"/>
+ </copy>
+ </target>
+
+ <target name="compile-tests"
depends="compile-connector,compile-test-resources,has-tests-check"
if="hasTests">
+ <mkdir dir="build/connector-tests/classes"/>
+ <javac srcdir="connector/src/test/java"
destdir="build/connector-tests/classes" deprecation="true" target="1.6"
source="1.6" debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <target name="jar-connector" depends="compile-connector,precompile-check"
if="canBuild">
+ <mkdir dir="build/xsdclasses"/>
+ <mkdir dir="build/wsdlclasses"/>
+ <mkdir dir="build/jar"/>
+ <jar destfile="build/jar/mcf-${ant.project.name}-connector.jar">
+ <fileset dir="build/connector/classes"/>
+ <fileset dir="build/xsdclasses"/>
+ <fileset dir="build/wsdlclasses"/>
+ </jar>
+ </target>
+
+ <target name="jar-tests" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="build/test-jar"/>
+ <jar
destfile="build/test-jar/mcf-${ant.project.name}-connector-tests.jar"
basedir="build/connector-tests/classes"/>
+ </target>
+
+ <target name="jar-interface" depends="compile-interface,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar
destfile="build/jar/mcf-${ant.project.name}-connector-interface.jar"
basedir="build/interface/classes"/>
+ </target>
+
+ <target name="jar-implementation"
depends="compile-implementation,has-RMI-check" if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar
destfile="build/jar/mcf-${ant.project.name}-connector-implementation.jar"
basedir="build/implementation/classes"/>
+ </target>
+
+ <target name="jar-rmiskel" depends="compile-rmic,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar
destfile="build/jar/mcf-${ant.project.name}-connector-rmiskel.jar"
basedir="build/rmiskel/classes"/>
+ </target>
+
+ <target name="jar-rmistub" depends="compile-rmic,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar
destfile="build/jar/mcf-${ant.project.name}-connector-rmistub.jar"
basedir="build/rmistub/classes"/>
+ </target>
+
+ <target name="jar-server" depends="compile-server,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar destfile="build/jar/mcf-${ant.project.name}-connector-server.jar"
basedir="build/server/classes"/>
+ </target>
+
+ <target name="jar-registry" depends="compile-registry,has-RMI-check"
if="hasRMI">
+ <mkdir dir="build/jar"/>
+ <jar
destfile="build/jar/mcf-${ant.project.name}-connector-registry.jar"
basedir="build/registry/classes"/>
+ </target>
+
+ <target name="lib-rmi" depends="jar-interface,jar-rmistub,has-RMI-check"
if="hasRMI">
+ <mkdir dir="dist/lib"/>
+ <copy todir="dist/lib"
file="build/jar/mcf-${ant.project.name}-connector-rmistub.jar"/>
+ <copy todir="dist/lib"
file="build/jar/mcf-${ant.project.name}-connector-interface.jar"/>
+ </target>
+
+ <target name="lib-wsdls" depends="has-wsdls-check" if="hasWSDLs">
+ <mkdir dir="dist/lib"/>
+ <copy todir="dist/lib">
+ <fileset dir="${mcf-dist}/lib">
+ <include name="axis*.jar"/>
+ <include name="saaj*.jar"/>
+ <include name="wsdl*.jar"/>
+ <include name="activation*.jar"/>
+ <include name="commons-discovery*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="lib-xsds" depends="has-xsds-check" if="hasXSDs">
+ <mkdir dir="dist/lib"/>
+ <copy todir="dist/lib">
+ <fileset dir="${mcf-dist}/lib">
+ <include name="castor*.jar"/>
+ <include name="geronimo-activation_1.1_spec*.jar"/>
+ <include name="geronimo-javamail_1.4_spec*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="lib"
depends="lib-rmi,lib-wsdls,lib-xsds,jar-connector,precompile-check"
if="canBuild">
+ <mkdir dir="dist/lib"/>
+ <copy todir="dist/lib"
file="build/jar/mcf-${ant.project.name}-connector.jar"/>
+ </target>
+
+ <target name="lib-proprietary-README"
depends="include-README-lib-proprietary-check" if="includeREADMELibProprietary">
+ <mkdir dir="dist/lib-proprietary-only"/>
+ <copy
tofile="dist/lib-proprietary-only/${ant.project.name}-README.txt"
file="proprietary-library-instructions.txt"/>
+ </target>
+
+ <target name="lib-proprietary-instructions"
depends="include-proprietary-instructions-lib-proprietary-check"
if="includeProprietaryInstructionsLibProprietary">
+ <mkdir dir="dist/lib-proprietary-only"/>
+ <copy
tofile="dist/lib-proprietary-only/${ant.project.name}-PLACEHOLDER.txt"
file="proprietary-library-instructions.txt"/>
+ </target>
+
+ <target name="test-lib" depends="jar-tests" if="hasTests">
+ <mkdir dir="dist/test-lib"/>
+ <copy todir="dist/test-lib"
file="build/jar/mcf-${ant.project.name}-connector-tests.jar"/>
+ </target>
+
+ <target name="server-process"
depends="jar-interface,jar-implementation,jar-rmiskel,jar-server,has-RMI-check"
if="hasRMI">
+ <mkdir dir="dist/server-process/lib"/>
+ <copy todir="dist/server-process/lib">
+ <fileset dir="build/jar">
+ <include name="mcf-${ant.project.name}-connector-server.jar"/>
+ <include
name="mcf-${ant.project.name}-connector-interface.jar"/>
+ <include name="mcf-${ant.project.name}-connector-rmiskel.jar"/>
+ <include
name="mcf-${ant.project.name}-connector-implementation.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="dist/server-process">
+ <fileset dir="server-scripts">
+ <include name="*.sh"/>
+ <include name="*.bat"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="registry-process" depends="jar-registry,has-RMI-check"
if="hasRMI">
+ <mkdir dir="dist/registry-process/lib"/>
+ <copy todir="dist/registry-process/lib">
+ <fileset dir="build/jar">
+ <include
name="mcf-${ant.project.name}-connector-registry.jar"/>
+ <include
name="mcf-${ant.project.name}-connector-interface.jar"/>
+ </fileset>
+ </copy>
+ <copy todir="dist/registry-process">
+ <fileset dir="registry-scripts">
+ <include name="*.sh"/>
+ <include name="*.bat"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Override this target to provide integration materials to the
connector dist area -->
+ <target name="integration"/>
+
+ <!-- Delivery targets. These targets conditionally deliver code and
connectors.xml lines
+ into the main distribution area.
+ -->
+
+ <target name="general-connector-integration-check" depends="integration">
+ <available file="dist/integration" type="dir"
property="has-integration"/>
+ </target>
+
+ <target name="general-server-process-check" depends="server-process">
+ <available file="dist/server-process" type="dir"
property="has-server-process"/>
+ </target>
+
+ <target name="general-registry-process-check" depends="registry-process">
+ <available file="dist/registry-process" type="dir"
property="has-registry-process"/>
+ </target>
+
+ <target name="general-connector-delivery-integration"
depends="general-connector-integration-check" if="has-integration">
+ <mkdir dir="${mcf-dist}/${ant.project.name}-integration"/>
+ <copy todir="${mcf-dist}/${ant.project.name}-integration">
+ <fileset dir="dist/integration"/>
+ </copy>
+ </target>
+
+ <target name="general-delivery-server-process"
depends="general-server-process-check" if="has-server-process">
+ <mkdir dir="${mcf-dist}/${ant.project.name}-server-process"/>
+ <copy todir="${mcf-dist}/${ant.project.name}-server-process">
+ <fileset dir="dist/server-process"/>
+ </copy>
+ </target>
+
+ <target name="general-delivery-registry-process"
depends="general-registry-process-check" if="has-registry-process">
+ <mkdir dir="${mcf-dist}/${ant.project.name}-registry-process"/>
+ <copy todir="${mcf-dist}/${ant.project.name}-registry-process">
+ <fileset dir="dist/registry-process"/>
+ </copy>
+ </target>
+
+ <target name="general-connector-delivery-processes"
depends="general-delivery-server-process,general-delivery-registry-process"/>
+
+ <target name="general-connector-proprietary-only-check"
depends="lib-proprietary-instructions,lib-proprietary-README">
+ <available file="dist/lib-proprietary-only" type="dir"
property="has-proprietary-only"/>
+ </target>
+
+ <target name="general-connector-proprietary-only-delivery"
depends="general-connector-proprietary-only-check" if="has-proprietary-only">
+ <mkdir dir="${mcf-dist}/connector-lib-proprietary"/>
+ <copy todir="${mcf-dist}/connector-lib-proprietary">
+ <fileset dir="dist/lib-proprietary-only"/>
+ </copy>
+ </target>
+
+ <target name="general-connector-delivery"
depends="general-connector-proprietary-only-delivery,general-connector-delivery-integration,general-connector-delivery-processes">
+ <mkdir dir="${mcf-dist}/connector-lib"/>
+ <copy todir="${mcf-dist}/connector-lib">
+ <fileset dir="dist/lib"/>
+ </copy>
+ </target>
+
+ <target name="general-connector-doc-check" depends="doc">
+ <available file="dist/doc" type="dir" property="has-doc"/>
+ </target>
+
+ <target name="general-connector-doc-delivery"
depends="general-connector-doc-check" if="has-doc">
+ <mkdir dir="${mcf-dist}/doc/api/${ant.project.name}"/>
+ <copy todir="${mcf-dist}/doc/api/${ant.project.name}">
+ <fileset dir="dist/doc"/>
+ </copy>
+ </target>
+
+ <target name="general-connector-testjar-check" depends="test-lib">
+ <available file="dist/test-lib" type="dir" property="has-tests"/>
+ </target>
+
+ <target name="general-connector-testjar-delivery"
depends="general-connector-testjar-check" if="has-tests">
+ <mkdir dir="${mcf-dist}/connector-test-lib"/>
+ <copy todir="${mcf-dist}/connector-test-lib">
+ <fileset dir="dist/test-lib"/>
+ </copy>
+ </target>
+
+ <target name="general-connector-proprietary-runnable-check"
depends="lib-proprietary-instructions">
+ <available
file="dist/lib-proprietary-only/${ant.project.name}-PLACEHOLDER.txt"
property="has-placeholder"/>
+ <condition property="is-proprietary-runnable">
+ <not>
+ <isset property="has-placeholder"/>
+ </not>
+ </condition>
+ </target>
+
+ <target name="general-connector-runnable-check"
depends="general-connector-proprietary-runnable-check">
+ <available file="lib-proprietary" type="dir"
property="has-lib-proprietary"/>
+ <condition property="is-runnable">
+ <not>
+ <isset property="has-lib-proprietary"/>
+ </not>
+ </condition>
+ </target>
+
+ <target name="general-add-mapping-connector-commented"
depends="general-connector-runnable-check" unless="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
mapping connectors here -->" value="<!-- Add your mapping connectors here
-->
 <!--mappingconnector name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-mapping-connector-non-commented"
depends="general-connector-runnable-check" if="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
mapping connectors here -->" value="<!-- Add your mapping connectors here
-->
 <mappingconnector name="${connector-label}"
class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-mapping-connector-proprietary-commented"
depends="general-connector-proprietary-runnable-check"
unless="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your mapping connectors here -->" value="<!-- Add your mapping
connectors here -->
 <!--mappingconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-mapping-connector-proprietary-non-commented"
depends="general-connector-proprietary-runnable-check"
if="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your mapping connectors here -->" value="<!-- Add your mapping
connectors here -->
 <mappingconnector
name="${connector-label}" class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-mapping-connector"
depends="general-add-mapping-connector-commented,general-add-mapping-connector-non-commented,general-add-mapping-connector-proprietary-commented,general-add-mapping-connector-proprietary-non-commented">
+ </target>
+
+ <target name="general-add-authority-connector-commented"
depends="general-connector-runnable-check" unless="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
authority connectors here -->" value="<!-- Add your authority connectors
here -->
 <!--authorityconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-authority-connector-non-commented"
depends="general-connector-runnable-check" if="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
authority connectors here -->" value="<!-- Add your authority connectors
here -->
 <authorityconnector name="${connector-label}"
class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-authority-connector-proprietary-commented"
depends="general-connector-proprietary-runnable-check"
unless="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your authority connectors here -->" value="<!-- Add your authority
connectors here -->
 <!--authorityconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-authority-connector-proprietary-non-commented"
depends="general-connector-proprietary-runnable-check"
if="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your authority connectors here -->" value="<!-- Add your authority
connectors here -->
 <authorityconnector
name="${connector-label}" class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-authority-connector"
depends="general-add-authority-connector-commented,general-add-authority-connector-non-commented,general-add-authority-connector-proprietary-commented,general-add-authority-connector-proprietary-non-commented">
+ </target>
+
+ <target name="general-add-output-connector-commented"
depends="general-connector-runnable-check" unless="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
output connectors here -->" value="<!-- Add your output connectors here
-->
 <!--outputconnector name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-output-connector-non-commented"
depends="general-connector-runnable-check" if="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
output connectors here -->" value="<!-- Add your output connectors here
-->
 <outputconnector name="${connector-label}"
class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-output-connector-proprietary-commented"
depends="general-connector-proprietary-runnable-check"
unless="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your output connectors here -->" value="<!-- Add your output
connectors here -->
 <!--outputconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-output-connector-proprietary-non-commented"
depends="general-connector-proprietary-runnable-check"
if="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your output connectors here -->" value="<!-- Add your output
connectors here -->
 <outputconnector
name="${connector-label}" class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-output-connector"
depends="general-add-output-connector-commented,general-add-output-connector-non-commented,general-add-output-connector-proprietary-commented,general-add-output-connector-proprietary-non-commented">
+ </target>
+
+ <target name="general-add-repository-connector-commented"
depends="general-connector-runnable-check" unless="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
repository connectors here -->" value="<!-- Add your repository
connectors here -->
 <!--repositoryconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-repository-connector-non-commented"
depends="general-connector-runnable-check" if="is-runnable">
+ <replace file="${mcf-dist}/connectors.xml" token="<!-- Add your
repository connectors here -->" value="<!-- Add your repository
connectors here -->
 <repositoryconnector
name="${connector-label}" class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-repository-connector-proprietary-commented"
depends="general-connector-proprietary-runnable-check"
unless="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your repository connectors here -->" value="<!-- Add your repository
connectors here -->
 <!--repositoryconnector
name="${connector-label}"
class="${connector-class}"/-->"/>
+ </target>
+
+ <target name="general-add-repository-connector-proprietary-non-commented"
depends="general-connector-proprietary-runnable-check"
if="is-proprietary-runnable">
+ <replace file="${mcf-dist}/connectors-proprietary.xml" token="<!--
Add your repository connectors here -->" value="<!-- Add your repository
connectors here -->
 <repositoryconnector
name="${connector-label}" class="${connector-class}"/>"/>
+ </target>
+
+ <target name="general-add-repository-connector"
depends="general-add-repository-connector-commented,general-add-repository-connector-non-commented,general-add-repository-connector-proprietary-commented,general-add-repository-connector-proprietary-non-commented">
+ </target>
+
+ <!-- Main targets -->
+
+ <target name="deliver-connector" depends="general-connector-delivery"/>
+
+ <target name="deliver-doc" depends="general-connector-doc-delivery"/>
+
+ <target name="deliver-test-jars"
depends="general-connector-testjar-delivery"/>
+
+ <target name="build"
depends="lib,lib-proprietary-instructions,lib-proprietary-README,server-process,registry-process,integration"/>
+
+ <target name="build-tests" depends="build,jar-tests"/>
+
+ <target name="build-test-materials"/>
+
+ <target name="run-tests" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="test-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-output"
outputtoformatters="true" showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <formatter type="brief" usefile="false"/>
+ <batchtest todir="test-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*Test.class"/>
+ <exclude name="**/*DerbyTest.class"/>
+ <exclude name="**/*PostgresqlTest.class"/>
+ <exclude name="**/*MySQLTest.class"/>
+ <exclude name="**/*HSQLDBTest.class"/>
+ <exclude name="**/*HSQLDBextTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="run-tests-derby" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="test-derby-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-derby-output"
outputtoformatters="true" showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <formatter type="brief" usefile="false"/>
+ <batchtest todir="test-derby-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*DerbyTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="run-tests-postgresql"
depends="compile-tests,has-tests-check" if="hasTests">
+ <mkdir dir="test-postgresql-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-postgresql-output"
showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <batchtest todir="test-postgresql-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*PostgresqlTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="run-tests-mysql" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="test-mysql-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-mysql-output"
showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <batchtest todir="test-mysql-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*MySQLTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="run-tests-HSQLDB" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="test-HSQLDB-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-HSQLDB-output"
showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <batchtest todir="test-HSQLDB-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*HSQLDBTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="run-tests-HSQLDBext" depends="compile-tests,has-tests-check"
if="hasTests">
+ <mkdir dir="test-HSQLDBext-output"/>
+ <junit fork="true" maxmemory="128m" dir="test-HSQLDBext-output"
showoutput="true" haltonfailure="true">
+ <classpath>
+ <path refid="connector-test-classpath"/>
+ <pathelement location="build/connector-tests/classes"/>
+ </classpath>
+ <batchtest todir="test-HSQLDBext-output">
+ <fileset dir="build/connector-tests/classes">
+ <include name="**/*HSQLDBextTest.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="download-dependencies"/>
+
+ <target name="download-cleanup"/>
+
+ <target name="all"
depends="build,doc,build-tests,run-tests,run-tests-derby,run-tests-HSQLDB"/>
+
+</project>
Propchange:
manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
manifoldcf/branches/CONNECTORS-912/framework/buildfiles/connector-build.xml
------------------------------------------------------------------------------
svn:keywords = Id