Apache Nutch is an extensible and scalable web crawler
NUTCH-1804 Move JUnit dependency to test scope
Julien Niochec23d27e429f2
diff --git a/CHANGES.txt b/CHANGES.txtindex f8e472a0d..0c82bfc7e 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogNutch Current Development+* NUTCH-1804 Move JUnit dependency to test scope (jnioche)+* NUTCH-1811 bin/nutch junit to use junit 4 test runner (snagel)* NUTCH-1799 ANT Eclipse task discovers all plugin jars automatically (jnioche)diff --git a/build.xml b/build.xmlindex e67d55795..7617aaf7f 100644--- a/build.xml+++ b/build.xml@@ -455,7 +455,7 @@</target>- <target name="test-plugins" depends="compile,resolve-test" description="--> run plugin JUnit tests only">+ <target name="test-plugins" depends="resolve-test, compile" description="--> run plugin JUnit tests only"><ant dir="src/plugin" target="test" inheritAll="false"/></target>diff --git a/ivy/ivy.xml b/ivy/ivy.xmlindex 646204be3..35cb1a3ff 100644--- a/ivy/ivy.xml+++ b/ivy/ivy.xml@@ -74,7 +74,7 @@<!--Configuration: test --><!--artifacts needed for testing -->- <dependency org="junit" name="junit" rev="4.11" conf="*->default" />+ <dependency org="junit" name="junit" rev="4.11" conf="test->default" /><dependency org="org.apache.hadoop" name="hadoop-test" rev="1.2.0"conf="test->default" />diff --git a/src/plugin/build-plugin.xml b/src/plugin/build-plugin.xmlindex 0e7a6e47b..1656b5d56 100755--- a/src/plugin/build-plugin.xml+++ b/src/plugin/build-plugin.xml@@ -37,6 +37,7 @@<property name="build.dir" location="${nutch.root}/build/${name}"/><property name="build.classes" location="${build.dir}/classes"/><property name="build.test" location="${build.dir}/test"/>+ <property name="build.test.lib" location="${build.test}/lib"/><property name="deploy.dir" location="${nutch.root}/build/plugins/${name}"/>@@ -70,6 +71,14 @@<pathelement location="${nutch.root}/src/test"/><pathelement location="${conf.dir}"/><pathelement location="${nutch.root}/build"/>+ <!-- test dependencies specific to current plugin -->+ <fileset dir="${build.test.lib}">+ <include name="*.jar" />+ </fileset>+ <!-- global test dependencies -->+ <fileset dir="${nutch.root}/build/test/lib">+ <include name="*.jar" />+ </fileset><path refid="classpath"/></path>@@ -80,6 +89,7 @@<mkdir dir="${build.dir}"/><mkdir dir="${build.classes}"/><mkdir dir="${build.test}"/>+ <mkdir dir="${build.test.lib}"/><mkdir dir="${deploy.dir}"/><antcall target="init-plugin"/>@@ -216,7 +226,7 @@<target name="resolve-test" depends="clean-lib" description="resolve and retrieve dependencies with ivy"><ivy:resolve file="ivy.xml" conf="test" log="download-only"/>- <ivy:retrieve pattern="${deploy.dir}/[artifact]-[revision].[ext]" symlink="false" log="quiet"/>+ <ivy:retrieve pattern="${build.test.lib}/[artifact]-[revision].[ext]" symlink="false" log="quiet"/></target><!-- ================================================================== -->diff --git a/src/plugin/build.xml b/src/plugin/build.xmlindex 41cb8b6ed..46b834b76 100755--- a/src/plugin/build.xml+++ b/src/plugin/build.xml@@ -128,9 +128,9 @@<ant dir="indexer-elastic" target="clean"/><ant dir="indexer-solr" target="clean"/><ant dir="language-identifier" target="clean"/>- <ant dir="lib-commons-httpclient" target="clean"/>+ <!-- <ant dir="lib-commons-httpclient" target="clean"/> --><ant dir="lib-http" target="clean"/>- <ant dir="lib-lucene-analyzers" target="clean"/>+ <!-- <ant dir="lib-lucene-analyzers" target="clean"/>--><ant dir="lib-nekohtml" target="clean"/><ant dir="lib-regex-filter" target="clean"/><ant dir="lib-xml" target="clean"/>