Apache Nutch is an extensible and scalable web crawler
Review plugins building and testing
Jerome Charrona84715ac8886
diff --git a/src/plugin/analysis-de/build.xml b/src/plugin/analysis-de/build.xmlindex eb7084d3d..8e60ae87a 100644--- a/src/plugin/analysis-de/build.xml+++ b/src/plugin/analysis-de/build.xml@@ -4,9 +4,16 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-lucene-analyzers"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-lucene-analyzers/lib">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-lucene-analyzers/*.jar" /></fileset></path>diff --git a/src/plugin/analysis-fr/build.xml b/src/plugin/analysis-fr/build.xmlindex 031a7cfcd..abcba8b7a 100644--- a/src/plugin/analysis-fr/build.xml+++ b/src/plugin/analysis-fr/build.xml@@ -4,9 +4,16 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-lucene-analyzers"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-lucene-analyzers/lib">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-lucene-analyzers/*.jar" /></fileset></path>diff --git a/src/plugin/build-plugin.xml b/src/plugin/build-plugin.xmlindex 8123be8ff..211461db3 100755--- a/src/plugin/build-plugin.xml+++ b/src/plugin/build-plugin.xml@@ -68,10 +68,22 @@<!-- to be overridden by sub-projects --><target name="init-plugin"/>+ <!--+ ! Used to build plugin compilation dependencies+ ! (to be overridden by plugins)+ !-->+ <target name="deps-jar"/>++ <!--+ ! Used to deploy plugin runtime dependencies+ ! (to be overridden by plugins)+ !-->+ <target name="deps-test"/>+<!-- ====================================================== --><!-- Compile the Java files --><!-- ====================================================== -->- <target name="compile" depends="init">+ <target name="compile" depends="init,deps-jar"><echo message="Compiling plugin: ${name}"/><javacencoding="${build.encoding}"@@ -104,7 +116,7 @@<!-- ================================================================== --><!-- --><!-- ================================================================== -->- <target name="deploy" depends="jar">+ <target name="deploy" depends="jar, deps-test"><mkdir dir="${deploy.dir}"/><copy file="plugin.xml" todir="${deploy.dir}"preservelastmodified="true"/>diff --git a/src/plugin/build.xml b/src/plugin/build.xmlindex 3af7105b7..115c228ca 100755--- a/src/plugin/build.xml+++ b/src/plugin/build.xml@@ -6,6 +6,11 @@<!-- Build & deploy all the plugin jars. --><!-- ====================================================== --><target name="deploy">+ <ant dir="clustering-carrot2" target="deploy"/>+ <ant dir="creativecommons" target="deploy"/>+ <ant dir="index-basic" target="deploy"/>+ <ant dir="index-more" target="deploy"/>+ <ant dir="languageidentifier" target="deploy"/><ant dir="lib-commons-httpclient" target="deploy"/><ant dir="lib-http" target="deploy"/><ant dir="lib-jakarta-poi" target="deploy"/>@@ -13,11 +18,6 @@<ant dir="lib-lucene-analyzers" target="deploy"/><ant dir="lib-nekohtml" target="deploy"/><ant dir="lib-parsems" target="deploy"/>- <ant dir="clustering-carrot2" target="deploy"/>- <ant dir="creativecommons" target="deploy"/>- <ant dir="index-basic" target="deploy"/>- <ant dir="index-more" target="deploy"/>- <ant dir="languageidentifier" target="deploy"/><ant dir="nutch-extensionpoints" target="deploy"/><ant dir="ontology" target="deploy"/><ant dir="protocol-file" target="deploy"/>@@ -54,7 +54,7 @@<ant dir="languageidentifier" target="test"/><ant dir="lib-http" target="test"/><ant dir="ontology" target="test"/>- <ant dir="parse-ext" target="test"/>+ <!--ant dir="parse-ext" target="test"/--><ant dir="parse-html" target="test"/><!-- <ant dir="parse-mp3" target="test"/> --><ant dir="parse-msexcel" target="test"/>diff --git a/src/plugin/clustering-carrot2/build.xml b/src/plugin/clustering-carrot2/build.xmlindex 7388bd93d..f2729d317 100644--- a/src/plugin/clustering-carrot2/build.xml+++ b/src/plugin/clustering-carrot2/build.xml@@ -4,6 +4,14 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-log4j"/>+ <ant target="jar" inheritall="false" dir="../lib-nekohtml"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps"><fileset dir="${nutch.root}/build"><include name="**/lib-log4j/*.jar" />@@ -11,4 +19,11 @@</fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-log4j"/>+ <ant target="deploy" inheritall="false" dir="../lib-nekohtml"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ </target>+</project>diff --git a/src/plugin/creativecommons/build.xml b/src/plugin/creativecommons/build.xmlindex 9cd2dd026..65eb328a9 100755--- a/src/plugin/creativecommons/build.xml+++ b/src/plugin/creativecommons/build.xml@@ -4,6 +4,18 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../parse-html"/>+ </target>++<property name="this.web" location="${root}/src/web"/><property name="nutch.web" location="${nutch.root}/src/web"/>diff --git a/src/plugin/index-basic/build.xml b/src/plugin/index-basic/build.xmlindex e884ea264..57f9a3c5f 100755--- a/src/plugin/index-basic/build.xml+++ b/src/plugin/index-basic/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/index-more/build.xml b/src/plugin/index-more/build.xmlindex 9a967c808..b79514ca2 100644--- a/src/plugin/index-more/build.xml+++ b/src/plugin/index-more/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/languageidentifier/build.xml b/src/plugin/languageidentifier/build.xmlindex ccaef6003..7420c0f89 100644--- a/src/plugin/languageidentifier/build.xml+++ b/src/plugin/languageidentifier/build.xml@@ -14,5 +14,16 @@<fileset dir="${src.test}" includes="**/*.test, **/*.txt"/></copy></target>-++ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../parse-html"/>+ </target>+</project>diff --git a/src/plugin/lib-commons-httpclient/build.xml b/src/plugin/lib-commons-httpclient/build.xmlindex 4e6f70138..2f97ef441 100644--- a/src/plugin/lib-commons-httpclient/build.xml+++ b/src/plugin/lib-commons-httpclient/build.xml@@ -6,13 +6,11 @@<!--! Override the compile and jar targets,- ! since there is nothing to compile here.+ ! since there is nothing to compile here.! -->- <target name="compile" depends="init">- <echo message="Compiling plugin: ${name}"/>- </target>+ <target name="compile" depends="init"/>- <target name="jar" depends="compile">+ <target name="jar"><copy todir="${build.dir}" verbose="true"><fileset dir="./lib" includes="**/*.jar"/></copy>diff --git a/src/plugin/lib-http/build.xml b/src/plugin/lib-http/build.xmlindex f2ee0ef63..8d6a59689 100644--- a/src/plugin/lib-http/build.xml+++ b/src/plugin/lib-http/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/lib-jakarta-poi/build.xml b/src/plugin/lib-jakarta-poi/build.xmlindex 9af4cf830..e68a2b954 100644--- a/src/plugin/lib-jakarta-poi/build.xml+++ b/src/plugin/lib-jakarta-poi/build.xml@@ -6,12 +6,14 @@<!--! Override the compile and jar targets,- ! since there is nothing to compile here.+ ! since there is nothing to compile here.! -->- <target name="compile" depends="init">- <echo message="Compiling plugin: ${name}"/>- </target>+ <target name="compile" depends="init"/>- <target name="jar" depends="compile"/>+ <target name="jar" depends="compile">+ <copy todir="${build.dir}" verbose="true">+ <fileset dir="${root}/lib" includes="**/*.jar"/>+ </copy>+ </target></project>diff --git a/src/plugin/lib-log4j/build.xml b/src/plugin/lib-log4j/build.xmlindex 0eeb32e9e..2166af40d 100644--- a/src/plugin/lib-log4j/build.xml+++ b/src/plugin/lib-log4j/build.xml@@ -8,10 +8,12 @@! Override the compile and jar targets,! since there is nothing to compile here.! -->- <target name="compile" depends="init">- <echo message="Compiling plugin: ${name}"/>- </target>+ <target name="compile" depends="init"/>- <target name="jar" depends="compile"/>+ <target name="jar" depends="compile">+ <copy todir="${build.dir}" verbose="true">+ <fileset dir="./lib" includes="**/*.jar"/>+ </copy>+ </target></project>diff --git a/src/plugin/lib-lucene-analyzers/build.xml b/src/plugin/lib-lucene-analyzers/build.xmlindex 64453d490..778e486cd 100644--- a/src/plugin/lib-lucene-analyzers/build.xml+++ b/src/plugin/lib-lucene-analyzers/build.xml@@ -8,10 +8,12 @@! Override the compile and jar targets,! since there is nothing to compile here.! -->- <target name="compile" depends="init">- <echo message="Compiling plugin: ${name}"/>- </target>+ <target name="compile" depends="init"/>- <target name="jar" depends="compile"/>+ <target name="jar" depends="compile">+ <copy todir="${build.dir}" verbose="true">+ <fileset dir="./lib" includes="**/*.jar"/>+ </copy>+ </target></project>diff --git a/src/plugin/lib-nekohtml/build.xml b/src/plugin/lib-nekohtml/build.xmlindex 50e9aac20..4cb4b23f5 100644--- a/src/plugin/lib-nekohtml/build.xml+++ b/src/plugin/lib-nekohtml/build.xml@@ -6,11 +6,9 @@<!--! Override the compile and jar targets,- ! since there is nothing to compile here.+ ! since there is nothing to compile here.! -->- <target name="compile" depends="init">- <echo message="Compiling plugin: ${name}"/>- </target>+ <target name="compile" depends="init"/><target name="jar" depends="compile"><copy todir="${build.dir}" verbose="true">diff --git a/src/plugin/lib-parsems/build.xml b/src/plugin/lib-parsems/build.xmlindex ee923545d..3a1f07e41 100644--- a/src/plugin/lib-parsems/build.xml+++ b/src/plugin/lib-parsems/build.xml@@ -4,10 +4,23 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-jakarta-poi"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-jakarta-poi/lib">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-jakarta-poi/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ </target>+</project>diff --git a/src/plugin/ontology/build.xml b/src/plugin/ontology/build.xmlindex 2ffd6a093..b4c7cd020 100644--- a/src/plugin/ontology/build.xml+++ b/src/plugin/ontology/build.xml@@ -4,6 +4,17 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/time.owl" todir="${build.test}/data"/>diff --git a/src/plugin/parse-ext/build.xml b/src/plugin/parse-ext/build.xmlindex d68984a21..7fa10fb38 100644--- a/src/plugin/parse-ext/build.xml+++ b/src/plugin/parse-ext/build.xml@@ -4,6 +4,18 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<copy file="command" todir="${deploy.dir}" preservelastmodified="true"/><chmod file="${deploy.dir}/command" perm="755"/>diff --git a/src/plugin/parse-html/build.xml b/src/plugin/parse-html/build.xmlindex 0a3d6f905..fa68cd183 100755--- a/src/plugin/parse-html/build.xml+++ b/src/plugin/parse-html/build.xml@@ -4,10 +4,23 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-nekohtml"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps"><fileset dir="${nutch.root}/build"><include name="**/lib-nekohtml/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-nekohtml"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ </target>+</project>diff --git a/src/plugin/parse-js/build.xml b/src/plugin/parse-js/build.xmlindex 9f54071b4..27c42baad 100644--- a/src/plugin/parse-js/build.xml+++ b/src/plugin/parse-js/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/parse-mp3/build.xml b/src/plugin/parse-mp3/build.xmlindex 3eb58bfcd..a73f8b655 100755--- a/src/plugin/parse-mp3/build.xml+++ b/src/plugin/parse-mp3/build.xml@@ -4,6 +4,11 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/postgresql-id3v1.mp3" todir="${build.test}/data"/>diff --git a/src/plugin/parse-msexcel/build.xml b/src/plugin/parse-msexcel/build.xmlindex 1b888991e..4526042eb 100644--- a/src/plugin/parse-msexcel/build.xml+++ b/src/plugin/parse-msexcel/build.xml@@ -4,15 +4,29 @@<import file="../build-plugin.xml" />+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="jar" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="jar" inheritall="false" dir="../lib-parsems"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-jakarta-poi/lib">- <include name="*.jar" />- </fileset>- <fileset dir="../../../build/lib-parsems">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-jakarta-poi/*.jar" />+ <include name="**/lib-parsems/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="deploy" inheritall="false" dir="../lib-parsems"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data" /><copy todir="${build.test}/data">diff --git a/src/plugin/parse-mspowerpoint/build.xml b/src/plugin/parse-mspowerpoint/build.xmlindex 972c0bc99..8d30f772b 100644--- a/src/plugin/parse-mspowerpoint/build.xml+++ b/src/plugin/parse-mspowerpoint/build.xml@@ -2,50 +2,64 @@<project name="parse-mspowerpoint" default="jar">- <import file="../build-plugin.xml" />-- <path id="plugin.deps">- <fileset dir="../lib-jakarta-poi/lib">- <include name="*.jar" />- </fileset>- <fileset dir="../../../build/lib-parsems">- <include name="*.jar" />- </fileset>- </path>-- <!-- for junit test -->- <mkdir dir="${build.test}/data" />- <copy todir="${build.test}/data">- <fileset dir="sample">- <include name="*.ppt" />- <include name="*.content" />- <include name="*.meta" />- </fileset>- </copy>-- <!-- ================================================================== -->- <!-- Run unit tests -->- <!-- ================================================================== -->- <target name="test" depends="compile-test, deploy" if="test.available">- <echo message="Testing plugin: ${name}"/>-- <junit printsummary="yes" haltonfailure="no" fork="yes"- errorProperty="tests.failed" failureProperty="tests.failed">- <sysproperty key="test.data" value="${build.test}/data"/>- <sysproperty key="test.input" value="${root}/data"/>- <classpath refid="test.classpath"/>- <formatter type="plain" />- <batchtest todir="${build.test}" unless="testcase">- <fileset dir="${src.test}"- includes="**/AllTests.java" excludes="**/${test.exclude}.java" />- </batchtest>- <batchtest todir="${build.test}" if="testcase">- <fileset dir="${src.test}" includes="**/${testcase}.java"/>- </batchtest>- </junit>-- <fail if="tests.failed">Tests failed!</fail>-- </target>+ <import file="../build-plugin.xml" />++ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="jar" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="jar" inheritall="false" dir="../lib-parsems"/>+ </target>++ <!-- Add compilation dependencies to classpath -->+ <path id="plugin.deps">+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-jakarta-poi/*.jar" />+ <include name="**/lib-parsems/*.jar" />+ </fileset>+ </path>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="deploy" inheritall="false" dir="../lib-parsems"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>+++ <!-- for junit test -->+ <mkdir dir="${build.test}/data" />+ <copy todir="${build.test}/data">+ <fileset dir="sample">+ <include name="*.ppt" />+ <include name="*.content" />+ <include name="*.meta" />+ </fileset>+ </copy>++ <!-- ================================================================== -->+ <!-- Run unit tests -->+ <!-- ================================================================== -->+ <target name="test" depends="compile-test, deploy" if="test.available">+ <echo message="Testing plugin: ${name}"/>++ <junit printsummary="yes" haltonfailure="no" fork="yes"+ errorProperty="tests.failed" failureProperty="tests.failed">+ <sysproperty key="test.data" value="${build.test}/data"/>+ <sysproperty key="test.input" value="${root}/data"/>+ <classpath refid="test.classpath"/>+ <formatter type="plain" />+ <batchtest todir="${build.test}" unless="testcase">+ <fileset dir="${src.test}"+ includes="**/AllTests.java" excludes="**/${test.exclude}.java" />+ </batchtest>+ <batchtest todir="${build.test}" if="testcase">+ <fileset dir="${src.test}" includes="**/${testcase}.java"/>+ </batchtest>+ </junit>++ <fail if="tests.failed">Tests failed!</fail>++ </target></project>diff --git a/src/plugin/parse-msword/build.xml b/src/plugin/parse-msword/build.xmlindex 7ad7894d0..5e6c326bd 100644--- a/src/plugin/parse-msword/build.xml+++ b/src/plugin/parse-msword/build.xml@@ -4,15 +4,29 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="jar" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="jar" inheritall="false" dir="../lib-parsems"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-jakarta-poi/lib">- <include name="*.jar" />- </fileset>- <fileset dir="../../../build/lib-parsems">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-jakarta-poi/*.jar" />+ <include name="**/lib-parsems/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-jakarta-poi"/>+ <ant target="deploy" inheritall="false" dir="../lib-parsems"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/word95.doc" todir="${build.test}/data"/>diff --git a/src/plugin/parse-pdf/build.xml b/src/plugin/parse-pdf/build.xmlindex 872bda75e..741675386 100644--- a/src/plugin/parse-pdf/build.xml+++ b/src/plugin/parse-pdf/build.xml@@ -4,12 +4,27 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-log4j"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../lib-log4j/lib">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-log4j/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-log4j"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/pdftest.pdf" todir="${build.test}/data"/>diff --git a/src/plugin/parse-rss/build.xml b/src/plugin/parse-rss/build.xmlindex 971bcded5..9f2120f66 100644--- a/src/plugin/parse-rss/build.xml+++ b/src/plugin/parse-rss/build.xml@@ -2,18 +2,32 @@<project name="parse-rss" default="jar">- <import file="../build-plugin.xml"/>-- <path id="plugin.deps">- <fileset dir="${nutch.root}/build">- <include name="**/lib-log4j/*.jar" />- <include name="**/lib-commons-httpclient/*.jar" />- </fileset>- </path>-+ <import file="../build-plugin.xml"/>++ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ <ant target="jar" inheritall="false" dir="../lib-log4j"/>+ </target>++ <!-- Add compilation dependencies to classpath -->+ <path id="plugin.deps">+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-log4j/*.jar" />+ </fileset>+ </path>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-log4j"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../lib-commons-httpclient"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/rsstest.rss" todir="${build.test}/data"/>-</project>diff --git a/src/plugin/parse-rtf/build.xml b/src/plugin/parse-rtf/build.xmlindex 7208a26a3..0ac7c0bff 100755--- a/src/plugin/parse-rtf/build.xml+++ b/src/plugin/parse-rtf/build.xml@@ -3,7 +3,19 @@<project name="parse-rtf" default="jar"><import file="../build-plugin.xml"/>-++ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<property name="rtf-src.jar" value="tmp/rtf_parser_src.jar"/><property name="rtf-parser.jar" value="lib/rtf-parser.jar"/>diff --git a/src/plugin/parse-swf/build.xml b/src/plugin/parse-swf/build.xmlindex 27e576bca..4b7b04a48 100644--- a/src/plugin/parse-swf/build.xml+++ b/src/plugin/parse-swf/build.xml@@ -4,6 +4,18 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ </target>++<!-- for junit test --><mkdir dir="${build.test}/data"/><copy file="sample/test1.swf" todir="${build.test}/data"/>diff --git a/src/plugin/parse-text/build.xml b/src/plugin/parse-text/build.xmlindex e1091dd8e..57dc637d4 100755--- a/src/plugin/parse-text/build.xml+++ b/src/plugin/parse-text/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/parse-zip/build.xml b/src/plugin/parse-zip/build.xmlindex ad55958bb..af4a4d0ee 100644--- a/src/plugin/parse-zip/build.xml+++ b/src/plugin/parse-zip/build.xml@@ -3,13 +3,26 @@<project name="parse-zip" default="jar"><import file="../build-plugin.xml"/>-- <!-- for junit test -->- <mkdir dir="${build.test}/data" />- <copy todir="${build.test}/data">- <fileset dir="sample">- <include name="*.zip" />- </fileset>- </copy>++ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>++ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ <ant target="deploy" inheritall="false" dir="../protocol-file"/>+ <ant target="deploy" inheritall="false" dir="../parse-text"/>+ </target>+++ <!-- for junit test -->+ <mkdir dir="${build.test}/data" />+ <copy todir="${build.test}/data">+ <fileset dir="sample">+ <include name="*.zip" />+ </fileset>+ </copy></project>diff --git a/src/plugin/protocol-file/build.xml b/src/plugin/protocol-file/build.xmlindex 8c838d704..b3f436c14 100644--- a/src/plugin/protocol-file/build.xml+++ b/src/plugin/protocol-file/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/protocol-ftp/build.xml b/src/plugin/protocol-ftp/build.xmlindex c83db7680..b50020b46 100644--- a/src/plugin/protocol-ftp/build.xml+++ b/src/plugin/protocol-ftp/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/protocol-http/build.xml b/src/plugin/protocol-http/build.xmlindex 201c33f5e..0196e07ff 100755--- a/src/plugin/protocol-http/build.xml+++ b/src/plugin/protocol-http/build.xml@@ -4,10 +4,22 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="jar" inheritall="false" dir="../lib-http"/>+ </target>++ <!-- Add compilation dependencies to classpath --><path id="plugin.deps">- <fileset dir="../../../build/lib-http">- <include name="*.jar" />+ <fileset dir="${nutch.root}/build">+ <include name="**/lib-http/*.jar" /></fileset></path>+ <!-- Deploy Unit test dependencies -->+ <target name="deps-test">+ <ant target="deploy" inheritall="false" dir="../lib-http"/>+ <ant target="deploy" inheritall="false" dir="../nutch-extensionpoints"/>+ </target>+</project>diff --git a/src/plugin/protocol-httpclient/build.xml b/src/plugin/protocol-httpclient/build.xmlindex d43bb3261..67d62c955 100644--- a/src/plugin/protocol-httpclient/build.xml+++ b/src/plugin/protocol-httpclient/build.xml@@ -4,6 +4,11 @@<import file="../build-plugin.xml"/>+ <target name="deps-jar">+ <ant target="jar" inheritall="false" dir="../lib-commons-httpclient"/>+ <ant target="jar" inheritall="false" dir="../lib-http"/>+ </target>+<path id="plugin.deps"><fileset dir="${nutch.root}/build"><include name="**/lib-http/*.jar" />diff --git a/src/plugin/query-basic/build.xml b/src/plugin/query-basic/build.xmlindex 45df71c12..31b249d8b 100755--- a/src/plugin/query-basic/build.xml+++ b/src/plugin/query-basic/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/query-more/build.xml b/src/plugin/query-more/build.xmlindex b6f10b10a..aa79fa66a 100644--- a/src/plugin/query-more/build.xml+++ b/src/plugin/query-more/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/query-site/build.xml b/src/plugin/query-site/build.xmlindex 2c4d71973..10016f73c 100755--- a/src/plugin/query-site/build.xml+++ b/src/plugin/query-site/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/query-url/build.xml b/src/plugin/query-url/build.xmlindex ae851f4ef..25fc6212a 100644--- a/src/plugin/query-url/build.xml+++ b/src/plugin/query-url/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/urlfilter-prefix/build.xml b/src/plugin/urlfilter-prefix/build.xmlindex 004715893..5601679d5 100644--- a/src/plugin/urlfilter-prefix/build.xml+++ b/src/plugin/urlfilter-prefix/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>diff --git a/src/plugin/urlfilter-regex/build.xml b/src/plugin/urlfilter-regex/build.xmlindex 56a67145e..23dc14a9d 100644--- a/src/plugin/urlfilter-regex/build.xml+++ b/src/plugin/urlfilter-regex/build.xml@@ -4,4 +4,9 @@<import file="../build-plugin.xml"/>+ <!-- Build compilation dependencies -->+ <target name="deps-jar">+ <ant target="compile-core" inheritall="false" dir="${nutch.root}"/>+ </target>+</project>