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.

git-svn-id: https://svn.apache.org/repos/asf/incubator/solr/trunk@490031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yoav Shapira 2006-12-24 15:07:37 +00:00
parent e44e51ece0
commit 445eca12ec
3 changed files with 23 additions and 4 deletions

View File

@ -93,7 +93,12 @@ Instructions for Building Apache Solr from Source
4. Navigate to that folder and issue an "ant" command to see the available options
for 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 build
and package Solr into the example/webapps directory. See also example/README.txt.

View File

@ -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" />
<javac
destdir="${dest}/tests"

View File

@ -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>