Apache Nutch is an extensible and scalable web crawler
Fix the issue with different version of Xerces - internal one in JDK and external in lib/. Improve readability of conditionals.
Andrzej Bialecki659b9b6df020
diff --git a/src/bin/nutch b/src/bin/nutchindex 08e1c0751..48f060822 100755--- a/src/bin/nutch+++ b/src/bin/nutch@@ -75,7 +75,6 @@ if [ "$JAVA_HOME" = "" ]; thenexit 1fi-local=true# NUTCH_JOBif [ -f ${NUTCH_HOME}/nutch-*.job ]; then@@ -83,6 +82,8 @@ if [ -f ${NUTCH_HOME}/nutch-*.job ]; thenfor f in $NUTCH_HOME/nutch-*.job; doNUTCH_JOB=$f;done+else+ local=truefi# cygwin path translation@@ -189,10 +190,10 @@ elseCLASS=$COMMANDfi-# distributed mode-EXEC_CALL="$HADOOP_HOME/bin/hadoop jar $NUTCH_JOB"if $local; then+ # fix for the external Xerces lib issue with SAXParserFactory+ NUTCH_OPTS="-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl $NUTCH_OPTS"EXEC_CALL="$JAVA $JAVA_HEAP_MAX $NUTCH_OPTS -classpath $CLASSPATH"else# check that we are really in a hadoop config@@ -200,6 +201,8 @@ elseecho "Can't find Hadoop scripts. Set HADOOP_HOME to a valid home of Hadoop installation."exit -1;fi+ # distributed mode+ EXEC_CALL="$HADOOP_HOME/bin/hadoop jar $NUTCH_JOB"fi# run it