java - JUnit in Ant build script attempting and failing to delete .svn directory -


i'm following example pragmatic project automation. i'm running on windows 7 , pulling project local subversion repo. when run ant in project's base directory, following error [junit] couldn't delete .svn. here's full output of command:

buildfile: s:\cruisecontrol\builds\dms\checkout\dms\build.xml  prepare:     [mkdir] created dir: s:\cruisecontrol\builds\dms\checkout\dms\build\prod     [mkdir] created dir: s:\cruisecontrol\builds\dms\checkout\dms\build\test  compile:     [javac] compiling 5 source files s:\cruisecontrol\builds\dms\checkout\dms\build\prod  compile-tests:     [javac] compiling 7 source files s:\cruisecontrol\builds\dms\checkout\dms\build\test  test:     [junit] testsuite: com.pragprog.dms.documenttest     [junit] tests run: 2, failures: 0, errors: 0, time elapsed: 0.065 sec     [junit]      [junit] testsuite: com.pragprog.dms.searchtest     [junit] tests run: 2, failures: 0, errors: 2, time elapsed: 0.015 sec     [junit]      [junit] testcase: testtitlesearch(com.pragprog.dms.searchtest): caused error     [junit] couldn't delete .svn     [junit] java.io.ioexception: couldn't delete .svn     [junit]     @ org.apache.lucene.store.fsdirectory.create(fsdirectory.java:166)     [junit]     @ org.apache.lucene.store.fsdirectory.<init>(fsdirectory.java:151)     [junit]     @ org.apache.lucene.store.fsdirectory.getdirectory(fsdirectory.java:132)     [junit]     @ org.apache.lucene.index.indexwriter.<init>(indexwriter.java:160)     [junit]     @ com.pragprog.dms.indexer.index(unknown source)     [junit]     @ com.pragprog.dms.searchtest.setup(unknown source)     [junit]      [junit]      [junit] testcase: testcontentsearch(com.pragprog.dms.searchtest):   caused error     [junit] couldn't delete .svn     [junit] java.io.ioexception: couldn't delete .svn     [junit]     @ org.apache.lucene.store.fsdirectory.create(fsdirectory.java:166)     [junit]     @ org.apache.lucene.store.fsdirectory.<init>(fsdirectory.java:151)     [junit]     @ org.apache.lucene.store.fsdirectory.getdirectory(fsdirectory.java:132)     [junit]     @ org.apache.lucene.index.indexwriter.<init>(indexwriter.java:160)     [junit]     @ com.pragprog.dms.indexer.index(unknown source)     [junit]     @ com.pragprog.dms.searchtest.setup(unknown source)     [junit]      [junit]   build failed s:\cruisecontrol\builds\dms\checkout\dms\build.xml:33: test com.pragprog.dms.searchtest failed  total time: 0 seconds 

and build.xml file:

<project name="dms" default="compile" basedir=".">     <property name="build.dir" location="build" />     <property name="build.prod.dir" location="${build.dir}/prod" />     <property name="build.test.dir" location="${build.dir}/test" />     <property name="doc.dir" location="doc" />     <property name="index.dir" location="index" />     <property name="src.dir" location="src" />     <property name="test.dir" location="test" />     <property name="vendor.lib.dir" location="vendor/lib" />     <path id="project.classpath">         <pathelement location="${build.prod.dir}" />         <pathelement location="${build.test.dir}" />         <fileset dir="${vendor.lib.dir}">             <include name="*.jar" />         </fileset>     </path>     <target name="prepare">         <mkdir dir="${build.prod.dir}" />         <mkdir dir="${build.test.dir}" />     </target>     <target name="compile" depends="prepare">         <javac srcdir="${src.dir}" destdir="${build.prod.dir}" includeantruntime="false">             <classpath refid="project.classpath" />         </javac>     </target>     <target name="compile-tests" depends="compile">         <javac srcdir="${test.dir}" destdir="${build.test.dir}" includeantruntime="false">             <classpath refid="project.classpath" />             <compilerarg value="-xlint:unchecked" />         </javac>     </target>     <target name="test" depends="compile-tests">         <junit haltonfailure="true">             <classpath refid="project.classpath" />             <formatter type="brief" usefile="false" />             <batchtest>                 <fileset dir="${build.test.dir}" includes="**/*test.class" />             </batchtest>             <sysproperty key="doc.dir" value="${doc.dir}" />             <sysproperty key="index.dir" value="${index.dir}" />         </junit>     </target>     <target name="clean">         <delete dir="${build.dir}" />     </target> </project> 

why junit attempting delete .svn directory? 1 trying delete? why failing so?

it looks test case testtitlesearch in com.pragprog.dms.searchtest failing. same happens testcontentsearch. perhaps trying clean house before starting. i'm guessing inadvertently put test case's scratch directory under version control when cloning locally.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -