In my Junit test, I have this line:
  
        File testFile = new
File(FileHolder.class.getResource("TestFileHolderFile.txt").toString());
  
    }

However, the TestfileHolderFile.txt never gets copied over into either my
target/test-classes or my target/classes dir..  How can I get it copied
over?  I used to do this in project.xml:

    <unitTest>
      <includes>
        <include>**/*Test.java</include>
        <include>**/Test*.java</include>
        
      </includes>
      <resources>
        <includes>
          <include>**/*.txt</include>
        </includes>
      </resources>
    </unitTest>

However, as of last nights CVS Head, this no longer works..  I looked at the
plugin, and I think I am doing everything properly, but no joy...

Thanks,
Eric

-----Original Message-----
From: James CE Johnson [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 8:39 AM
To: Turbine Maven Users List
Subject: Re: Can't find JUnitTask?


Turns out I have a completely messed up development sandbox.

In hopes of geting xmlc to work nicely, I built maven with a *special* 
version of xerces and an older (3.7) junit. All seemed well but I now 
think that that is the root of my junit problem. When I revert to a 
normal version of maven (eg -- built with the correct xerces and junit 
versions) everything works just fine.

Punt.

I'm going to try a different approach to the xmlc problem.

[EMAIL PROTECTED] wrote:

>Look at the dependencies in the test plugin:
>    <dependency>
>      <id>junit</id>
>      <version>3.8.1</version>
>      <properties>
>        <classloader>root</classloader>
>      </properties>
>    </dependency>
>
>Hint, hint. Use the <properties> tag in yours.
>--
>dIon Gillard, Multitask Consulting
>Blog:      http://www.freeroller.net/page/dion/Weblog
>Work:      http://www.multitask.com.au
>
>
>"James CE Johnson" <[EMAIL PROTECTED]> wrote on 22/11/2002 05:27:27 AM:
>
>  
>
>>>Because JUnit is not on the system classpath. You must path
>>>classpath="where.junit.is" to your taskdef.
>>>      
>>>
>>Fair enough...
>>
>>So I change my taskdef thusly:
>>
>>
>>   <goal name="funk">
>>       <taskdef name="junit"
>>                classname="org.apache.tools.ant.taskdefs.optional.
>>junit.JUnitTask"
>>                classpathref="maven.dependency.classpath"
>>                />
>>   </goal>
>>
>>Where my project.xml contains:
>>
>>    <dependency>
>>      <id>junit</id>
>>      <version>3.7</version>
>>      <properties>
>>        <war.bundle.jar></war.bundle.jar>
>>      </properties>
>>    </dependency>
>>
>>and just to be stupid:
>>
>>    <dependency>
>>      <id>ant:ant-optional</id>
>>      <version>1.5</version>
>>    </dependency>
>>
>>and I get the same behavior.
>>
>>    
>>
>>>Aslak
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: James CE Johnson [mailto:[EMAIL PROTECTED]]
>>>>Sent: 21. november 2002 18:40
>>>>To: [EMAIL PROTECTED]
>>>>Subject: Can't find JUnitTask?
>>>>
>>>>
>>>>Why would this:
>>>>
>>>>  <goal name="funk">
>>>>      <taskdef name="junit"
>>>>
>>>>classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
>>>>               />
>>>>  </goal>
>>>>
>>>>Result in this:
>>>>
>>>>funk:
>>>>
>>>>[ERROR] BUILD FAILED
>>>>[ERROR] taskdef class
>>>>org.apache.tools.ant.taskdefs.optional.junit.JUnitTask cannot be 
>>>>        
>>>>
>found
>  
>
>>>>I'm using the 11/18 CVS version of Maven.
>>>>
>>>>Thanks,
>>>>J
>>>>
>>>>
>>>>        
>>>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:turbine-maven-user-
>>[EMAIL PROTECTED]>
>>For additional commands, e-mail: <mailto:turbine-maven-user-
>>[EMAIL PROTECTED]>
>>
>>    
>>
>
>  
>
>>ForwardSourceID:NT0009130A 
>>    
>>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>  
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to