Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2007 add test libs to classpath of bin/nutch junit

Sebastian Nagel2407466fefa3
diff --git a/CHANGES.txt b/CHANGES.txt
index 5349dbab0..4f518ccd6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,7 +2,9 @@ Nutch Change Log
Nutch Current Development 1.11-SNAPSHOT
-* NUTCH-1995 Add support for wildcard to http.robot.rules.whitelist
+* NUTCH-2007 add test libs to classpath of bin/nutch junit (snagel)
+
+* NUTCH-1995 Add support for wildcard to http.robot.rules.whitelist (totaro)
* NUTCH-2013 Fetcher: missing logs "fetching ..." on stdout (snagel)
diff --git a/src/bin/nutch b/src/bin/nutch
index b25ae0fdf..975a32e59 100755
--- a/src/bin/nutch
+++ b/src/bin/nutch
@@ -270,6 +270,11 @@ elif [ "$COMMAND" = "plugin" ] ; then
CLASS=org.apache.nutch.plugin.PluginRepository
elif [ "$COMMAND" = "junit" ] ; then
CLASSPATH="$CLASSPATH:$NUTCH_HOME/test/classes/"
+ if $local; then
+ for f in "$NUTCH_HOME"/test/lib/*.jar; do
+ CLASSPATH="${CLASSPATH}:$f";
+ done
+ fi
CLASS=org.junit.runner.JUnitCore
elif [ "$COMMAND" = "startserver" ] ; then
CLASS=org.apache.nutch.service.NutchServer