You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2015/10/14 13:31:32 UTC
svn commit: r1708586 - in
/manifoldcf/branches/CONNECTORS-1162/connectors/kafka: ./ build.xml
test-materials/ test-materials/README.txt
Author: kwright
Date: Wed Oct 14 11:31:31 2015
New Revision: 1708586
URL: http://svn.apache.org/viewvc?rev=1708586&view=rev
Log:
Get integration test working
Added:
manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/ (with props)
manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt (with props)
Modified:
manifoldcf/branches/CONNECTORS-1162/connectors/kafka/ (props changed)
manifoldcf/branches/CONNECTORS-1162/connectors/kafka/build.xml
Propchange: manifoldcf/branches/CONNECTORS-1162/connectors/kafka/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 14 11:31:31 2015
@@ -0,0 +1,10 @@
+build
+dist
+doc
+target
+test-output
+test-derby-output
+test-postgresql-output
+test-HSQLDB-output
+test-HSQLDBext-output
+test-mysql-output
Modified: manifoldcf/branches/CONNECTORS-1162/connectors/kafka/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1162/connectors/kafka/build.xml?rev=1708586&r1=1708585&r2=1708586&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1162/connectors/kafka/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-1162/connectors/kafka/build.xml Wed Oct 14 11:31:31 2015
@@ -30,6 +30,8 @@
<import file="${mcf-dist}/connector-build.xml"/>
+ <property name="kafka.version" value="0.8.2.1"/>
+
<path id="connector-classpath">
<path refid="mcf-connector-build.connector-classpath"/>
<fileset dir="../../lib">
@@ -50,61 +52,52 @@
</copy>
</target>
- <!-- test deps
- <include name="commons-lang3*.jar"/>
- <include name="metrics-core*.jar"/>
- <include name="jopt-simple*.jar"/>
- <include name="scala-library*.jar"/>
- <include name="kafka_2.11*.jar"/>
- <include name="scala-xml_2.11*.jar"/>
- <include name="scala-parser-combinators_2.11*.jar"/>
- -->
- <target name="download-kafka">
- <mkdir dir="lib"/>
+ <target name="download-dependencies">
+ <mkdir dir="test-materials"/>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="org/apache/kafka"/>
- <param name="artifact-version" value="0.8.2.1"/>
+ <param name="artifact-version" value="${kafka.version}"/>
<param name="artifact-name" value="kafka_2.11"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="org/apache/commons"/>
<param name="artifact-version" value="3.4"/>
<param name="artifact-name" value="commons-lang3"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="com/yammer/metrics"/>
<param name="artifact-version" value="2.2.0"/>
<param name="artifact-name" value="metrics-core"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="org/scala-lang"/>
<param name="artifact-version" value="2.11.0"/>
<param name="artifact-name" value="scala-library"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="net/sf/jopt-simple"/>
<param name="artifact-version" value="3.2"/>
<param name="artifact-name" value="jopt-simple"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="org/scala-lang/modules"/>
<param name="artifact-version" value="1.0.4"/>
<param name="artifact-name" value="scala-xml_2.11"/>
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
- <param name="target" value="lib"/>
+ <param name="target" value="test-materials"/>
<param name="project-path" value="org/scala-lang/modules"/>
<param name="artifact-version" value="1.0.4"/>
<param name="artifact-name" value="scala-parser-combinators_2.11"/>
@@ -112,6 +105,38 @@
</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/kafka_2.11-${kafka.version}.jar" property="tests-present"/>
+ </target>
+
+ <target name="pretest-warn" depends="calculate-testcode-condition" unless="tests-present">
+ <echo message="Need Kafka download in order to compile tests - run ant make-deps"/>
+ </target>
+
+ <path id="connector-test-classpath">
+ <path refid="mcf-connector-build.connector-test-classpath"/>
+ <fileset dir="../../lib">
+ <include name="zookeeper*.jar"/>
+ <include name="kafka-clients*.jar"/>
+ <include name="lz4*.jar"/>
+ <include name="snappy-java*.jar"/>
+ </fileset>
+ <fileset dir="test-materials">
+ <include name="commons-lang3*.jar"/>
+ <include name="metrics-core*.jar"/>
+ <include name="jopt-simple*.jar"/>
+ <include name="scala-library*.jar"/>
+ <include name="kafka_2.11*.jar"/>
+ <include name="scala-xml_2.11*.jar"/>
+ <include name="scala-parser-combinators_2.11*.jar"/>
+ </fileset>
+ </path>
<target name="deliver-connector" depends="mcf-connector-build.deliver-connector">
<antcall target="general-add-output-connector">
@@ -120,9 +145,4 @@
</antcall>
</target>
- <path id="connector-test-classpath">
- <path refid="mcf-connector-build.connector-test-classpath"/>
- <fileset file="../../lib/*.jar"/>
- </path>
-
</project>
Propchange: manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Oct 14 11:31:31 2015
@@ -0,0 +1 @@
+*.jar
Added: manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt?rev=1708586&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt (added)
+++ manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt Wed Oct 14 11:31:31 2015
@@ -0,0 +1,19 @@
+# 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.
+
+To test this connector, copy the appropriate Kafka jars and dependencies into
+this directory, and use the "ant test" target for the standard ant build.
+You can read more about the process on the "how-to-build-and-deploy.html"
+documentation page.
Propchange: manifoldcf/branches/CONNECTORS-1162/connectors/kafka/test-materials/README.txt
------------------------------------------------------------------------------
svn:eol-style = native