| <!-- |
| 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="cmis" default="all"> |
| |
| <property environment="env"/> |
| <condition property="mcf-dist" value="${env.MCFDISTPATH}"> |
| <isset property="env.MCFDISTPATH"/> |
| </condition> |
| <property name="abs-dist" location="../../dist"/> |
| <condition property="mcf-dist" value="${abs-dist}"> |
| <not> |
| <isset property="env.MCFDISTPATH"/> |
| </not> |
| </condition> |
| |
| <import file="${mcf-dist}/connector-build.xml"/> |
| |
| <property name="chemistry.version" value="1.1.0"/> |
| |
| <target name="download-dependencies"> |
| <property name="chemistry-package" value="org/apache/chemistry/opencmis"/> |
| <antcall target="download-via-maven"><param name="project-path" value="${chemistry-package}"/><param name="artifact-version" value="${chemistry.version}"/><param name="target" value="test-materials"/> |
| <param name="artifact-name" value="chemistry-opencmis-server-inmemory"/> |
| <param name="artifact-type" value="war"/> |
| </antcall> |
| </target> |
| |
| <target name="download-cleanup"> |
| <delete> |
| <fileset dir="test-materials" excludes="README*.txt"/> |
| </delete> |
| </target> |
| |
| <target name="calculate-testcode-condition"> |
| <available file="test-materials/chemistry-opencmis-server-inmemory-${chemistry.version}.war" property="tests-present"/> |
| </target> |
| |
| <target name="pretest-warn" depends="calculate-testcode-condition" unless="tests-present"> |
| <echo message="Need Apache Chemistry in-memory war download in order to run tests - run ant make-deps"/> |
| </target> |
| |
| <path id="connector-classpath"> |
| <path refid="mcf-connector-build.connector-classpath"/> |
| <fileset dir="../../lib"> |
| <include name="chemistry*.jar"/> |
| <include name="stax*.jar"/> |
| <include name="streambuffer*.jar"/> |
| <include name="jaxb*.jar"/> |
| <include name="jaxws*.jar"/> |
| <include name="woodstox-core-asl*.jar"/> |
| <include name="mimepull*.jar"/> |
| <include name="resolver*.jar"/> |
| <include name="org.osgi.core*.jar"/> |
| <!-- include name="commons-lang*.jar"/ --> |
| <include name="joda*.jar"/> |
| </fileset> |
| </path> |
| |
| <target name="lib" depends="mcf-connector-build.lib,precompile-check" if="canBuild"> |
| <mkdir dir="dist/lib"/> |
| <copy todir="dist/lib"> |
| <fileset dir="../../lib"> |
| <include name="chemistry*.jar"/> |
| <include name="stax*.jar"/> |
| <include name="streambuffer*.jar"/> |
| <include name="jaxb*.jar"/> |
| <include name="jaxws*.jar"/> |
| <include name="woodstox-core-asl*.jar"/> |
| <include name="mimepull*.jar"/> |
| <include name="resolver*.jar"/> |
| <include name="org.osgi.core*.jar"/> |
| <include name="joda*.jar"/> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="deliver-connector" depends="mcf-connector-build.deliver-connector"> |
| <antcall target="general-add-repository-connector"> |
| <param name="connector-label" value="CMIS"/> |
| <param name="connector-class" value="org.apache.manifoldcf.crawler.connectors.cmis.CmisRepositoryConnector"/> |
| </antcall> |
| <antcall target="general-add-authority-connector"> |
| <param name="connector-label" value="CMIS"/> |
| <param name="connector-class" value="org.apache.manifoldcf.authorities.authorities.cmis.CmisAuthorityConnector"/> |
| </antcall> |
| <antcall target="general-add-output-connector"> |
| <param name="connector-label" value="CMIS"/> |
| <param name="connector-class" value="org.apache.manifoldcf.agents.output.cmisoutput.CmisOutputConnector"/> |
| </antcall> |
| |
| </target> |
| |
| <target name="run-IT-HSQLDB" depends="compile-tests,pretest-check" if="canTest"> |
| <mkdir dir="test-HSQLDB-output"/> |
| <junit fork="true" maxmemory="256m" dir="test-HSQLDB-output" outputtoformatters="true" showoutput="true" haltonfailure="true"> |
| <jvmarg value="-DcrawlerWarPath=${mcf-dist}/web/war/mcf-crawler-ui.war"/> |
| <jvmarg value="-DauthorityserviceWarPath=${mcf-dist}/web/war/mcf-authority-service.war"/> |
| <jvmarg value="-DapiWarPath=${mcf-dist}/web/war/mcf-api-service.war"/> |
| <jvmarg value="-DcombinedWarPath=${mcf-dist}/web/war/mcf-combined-service.war"/> |
| <jvmarg value="-DopenCmisServerWarPath=../test-materials/chemistry-opencmis-server-inmemory-${chemistry.version}.war"/> |
| <jvmarg value="-Xms128m"/> |
| <jvmarg value="-Xmx256m"/> |
| <classpath> |
| <fileset dir="${env.JAVA_HOME}/lib"> |
| <include name="tools.jar"/> |
| </fileset> |
| <path refid="connector-test-classpath"/> |
| <pathelement location="build/connector-tests/classes"/> |
| </classpath> |
| <formatter type="brief" usefile="false"/> |
| <batchtest todir="test-HSQLDB-output"> |
| <fileset dir="build/connector-tests/classes"> |
| <include name="**/*HSQLDBIT.class"/> |
| </fileset> |
| </batchtest> |
| </junit> |
| </target> |
| |
| </project> |