Apache Solr open-source search software
test for JUnit presence, and fail with an informative message if JUnit is not present for the build. Somewhat surprisingly, we need JUnit for the core compile target, as opposed to just the compileTests target, so do that test in compile as well. Also a minor language improvement in tutorial.xml for the web site.
Yoav Shapira445eca12ec69
diff --git a/README.txt b/README.txtindex 247e1f35c73..3f31bd57914 100644--- a/README.txt+++ b/README.txt@@ -93,7 +93,12 @@ Instructions for Building Apache Solr from Source4. Navigate to that folder and issue an "ant" command to see the available optionsfor building, testing, and packaging Solr.-++ NOTE:+ Solr uses JUnit (http://www.junit.org/index.htm) for unit testing. You will need+ the JUnit library in your Ant classpath in order to compile and run the unit tests.+ See http://ant.apache.org/manual/OptionalTasks/junit.html for instructions.+NOTE:To see Solr in action, you may want to use the "ant example" command to buildand package Solr into the example/webapps directory. See also example/README.txt.diff --git a/build.xml b/build.xmlindex d9f1e995d95..7cfbac10d01 100644--- a/build.xml+++ b/build.xml@@ -160,7 +160,11 @@<!-- Compile the project. --><target name="compile"- description="Compile the source code.">+ description="Compile the source code."+ depends="checkJunitPresence">+ <fail unless="junitPresent"+ message="Couldn't find JUnit on runtime classpath." />+<mkdir dir="${dest}" /><javac destdir="${dest}"@@ -234,10 +238,20 @@<pathelement location="${dest}/tests"/></path>+ <!-- Check that JUnit is present. -->+ <target name="checkJunitPresence"+ description="Check that JUnit is present.">+ <available property="junitPresent"+ classname="junit.framework.TestCase" />+ </target>+<!-- Compile unit tests. --><target name="compileTests"description="Compile unit tests."- depends="compile">+ depends="compile,checkJunitPresence">+ <fail unless="junitPresent"+ message="Couldn't find JUnit on the runtime classpath." />+<mkdir dir="${dest}/tests" /><javacdestdir="${dest}/tests"diff --git a/src/site/src/documentation/content/xdocs/tutorial.xml b/src/site/src/documentation/content/xdocs/tutorial.xmlindex 40621ce2709..4141b986453 100755--- a/src/site/src/documentation/content/xdocs/tutorial.xml+++ b/src/site/src/documentation/content/xdocs/tutorial.xml@@ -59,7 +59,7 @@ To follow along with this tutorial, you will need...is in your PATH, and that you have "curl" installed from the "Web" category.</li><li>FireFox or Mozilla is the preferred browser to view the admin pages...- the current stylesheet doesn't currently look good on IE.+ The current stylesheet doesn't look good on Internet Explorer.</li></ol></section>