You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by jn...@apache.org on 2014/06/30 14:38:58 UTC

svn commit: r1606715 - in /nutch/trunk: CHANGES.txt build.xml default.properties

Author: jnioche
Date: Mon Jun 30 12:38:58 2014
New Revision: 1606715

URL: http://svn.apache.org/r1606715
Log:
NUTCH 1803 Put test dependencies in a separate lib dir

Modified:
    nutch/trunk/CHANGES.txt
    nutch/trunk/build.xml
    nutch/trunk/default.properties

Modified: nutch/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=1606715&r1=1606714&r2=1606715&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Mon Jun 30 12:38:58 2014
@@ -2,6 +2,8 @@ Nutch Change Log
 
 Nutch Current Development
 
+* NUTCH-1803 Put test dependencies in a separate lib dir (jnioche)
+
 * NUTCH-385 Improve description of thread related configuration for Fetcher (jnioche,lufeng)
 
 * NUTCH-1633 slf4j is provided by hadoop and should not be included in the job file (kaveh minooie via jnioche)

Modified: nutch/trunk/build.xml
URL: http://svn.apache.org/viewvc/nutch/trunk/build.xml?rev=1606715&r1=1606714&r2=1606715&view=diff
==============================================================================
--- nutch/trunk/build.xml (original)
+++ nutch/trunk/build.xml Mon Jun 30 12:38:58 2014
@@ -43,8 +43,9 @@
     </fileset>
   </path>
 
-  <!-- the unit test classpath -->
   <dirname property="plugins.classpath.dir" file="${build.plugins}"/>
+
+  <!-- the unit test classpath -->
   <path id="test.classpath">
     <pathelement location="${test.build.classes}" />
     <pathelement location="${conf.dir}"/>
@@ -55,6 +56,9 @@
     <fileset dir="${build.lib.dir}">
       <include name="*.jar" />
     </fileset>
+    <fileset dir="${test.build.lib.dir}">
+      <include name="*.jar" />
+    </fileset>
   </path>
 
   <presetdef name="javac">
@@ -71,6 +75,7 @@
 
     <mkdir dir="${test.build.dir}"/>
     <mkdir dir="${test.build.classes}"/>
+    <mkdir dir="${test.build.lib.dir}"/>
 
     <touch datetime="01/25/1971 2:00 pm">
       <fileset dir="${conf.dir}" includes="**/*.template"/>
@@ -350,7 +355,7 @@
   <!-- ================================================================== -->
   <!-- Compile test code                                                  --> 
   <!-- ================================================================== -->
-  <target name="compile-core-test" depends="compile-core, resolve-test" description="--> compile test code">
+  <target name="compile-core-test" depends="resolve-test, compile-core" description="--> compile test code">
     <javac 
      encoding="${build.encoding}" 
      srcdir="${test.src.dir}"
@@ -370,7 +375,7 @@
   <!-- Run Nutch proxy                                                    --> 
   <!-- ================================================================== -->
 
-  <target name="proxy" depends="job, compile-core-test" description="--> run nutch proxy">
+  <target name="proxy" depends="compile-core-test, job" description="--> run nutch proxy">
     <java classname="org.apache.nutch.tools.proxy.TestbedProxy" fork="true">
       <classpath refid="test.classpath"/>
       <arg value="-fake"/>
@@ -404,7 +409,7 @@
   <!-- ================================================================== -->
   <target name="test" depends="test-core, test-plugins" description="--> run JUnit tests"/>
 
-  <target name="test-core" depends="job, compile-core-test" description="--> run core JUnit tests only">
+  <target name="test-core" depends="compile-core-test, job" description="--> run core JUnit tests only">
 
     <delete dir="${test.build.data}"/>
     <mkdir dir="${test.build.data}"/>
@@ -450,7 +455,7 @@
 
   </target>   
 
-  <target name="test-plugins" depends="compile" description="--> run plugin JUnit tests only">
+  <target name="test-plugins" depends="compile,resolve-test" description="--> run plugin JUnit tests only">
     <ant dir="src/plugin" target="test" inheritAll="false"/>
   </target>
 
@@ -470,7 +475,7 @@
 
   <target name="resolve-test" depends="clean-lib" description="--> resolve and retrieve dependencies with ivy">
     <ivy:resolve file="${ivy.file}" conf="test" log="download-only"/>
-    <ivy:retrieve pattern="${build.lib.dir}/[artifact]-[revision].[ext]" symlink="false" log="quiet"/>
+    <ivy:retrieve pattern="${test.build.lib.dir}/[artifact]-[revision].[ext]" symlink="false" log="quiet"/>
     <antcall target="copy-libs"/>
   </target>
 
@@ -814,6 +819,7 @@
   <!-- target: clean-lib  =============================================== -->
   <target name="clean-lib" description="--> clean the project libraries directory (dependencies)">
     <delete includeemptydirs="true" dir="${build.lib.dir}"/>
+    <delete includeemptydirs="true" dir="${test.build.lib.dir}"/>
   </target>
 
   <!-- target: clean-build  ============================================= -->

Modified: nutch/trunk/default.properties
URL: http://svn.apache.org/viewvc/nutch/trunk/default.properties?rev=1606715&r1=1606714&r2=1606715&view=diff
==============================================================================
--- nutch/trunk/default.properties (original)
+++ nutch/trunk/default.properties Mon Jun 30 12:38:58 2014
@@ -34,6 +34,7 @@ build.lib.dir=${build.dir}/lib
 
 test.src.dir = ./src/test
 test.build.dir = ${build.dir}/test
+test.build.lib.dir = ${test.build.dir}/lib
 test.build.data =  ${test.build.dir}/data
 test.build.classes = ${test.build.dir}/classes
 test.build.javadoc = ${test.build.dir}/docs/api