You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by AJ Chen <an...@sbcglobal.net> on 2005/08/29 03:01:12 UTC

junit test failed

I'm a new comer, trying to test Nutch for vertical search. I downloaded 
the code and compiled it in cygwin. But, the unit test failed with the 
following message:

test-core:
   [delete] Deleting directory nutch\trunk\build\test\data
    [mkdir] Created dir: nutch\trunk\build\test\data

BUILD FAILED
nutch\trunk\build.xml:173: Could not create task or type of type: junit.

Did I miss anything for junit? Appreciate your help.


AJ Chen



Re: junit test failed

Posted by AJ Chen <an...@sbcglobal.net>.
Michael,
See http://wiki.apache.org/nutch/HowToContribute for unit test. Junit is 
a tool Nutch uses to do some unit test. Nutch package includes quite a 
few test classes. It's a good idea to run the test as a way to check if 
there is any unexpected consequences that may be introduced by new codes.

Apparently, the command "ant test" does not work. Anybody has an idea 
how to make the unit test work?

AJ

Michael Ji wrote:

>What is junit test standing for? A particular patch?
>
>Sorry, if my question is silly.
>
>Michael Ji,
>
>--- AJ Chen <an...@sbcglobal.net> wrote:
>
>  
>
>>I'm a new comer, trying to test Nutch for vertical
>>search. I downloaded 
>>the code and compiled it in cygwin. But, the unit
>>test failed with the 
>>following message:
>>
>>test-core:
>>   [delete] Deleting directory
>>nutch\trunk\build\test\data
>>    [mkdir] Created dir: nutch\trunk\build\test\data
>>
>>BUILD FAILED
>>nutch\trunk\build.xml:173: Could not create task or
>>type of type: junit.
>>
>>Did I miss anything for junit? Appreciate your help.
>>
>>
>>AJ Chen
>>
>>
>>
>>    
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>  
>

-- 
AJ (Anjun) Chen, Ph.D.
Canova Bioconsulting 
Marketing * BD * Software Development
748 Matadero Ave., Palo Alto, CA 94306, USA
Cell 650-283-4091, anjun.chen@sbcglobal.net
---------------------------------------------------

Re: junit test failed

Posted by Michael Ji <fj...@yahoo.com>.
What is junit test standing for? A particular patch?

Sorry, if my question is silly.

Michael Ji,

--- AJ Chen <an...@sbcglobal.net> wrote:

> I'm a new comer, trying to test Nutch for vertical
> search. I downloaded 
> the code and compiled it in cygwin. But, the unit
> test failed with the 
> following message:
> 
> test-core:
>    [delete] Deleting directory
> nutch\trunk\build\test\data
>     [mkdir] Created dir: nutch\trunk\build\test\data
> 
> BUILD FAILED
> nutch\trunk\build.xml:173: Could not create task or
> type of type: junit.
> 
> Did I miss anything for junit? Appreciate your help.
> 
> 
> AJ Chen
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: junit test failed

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
This has nothing to do with the version of Ant.  JUnit's JAR file  
needs to be in ANT_HOME/lib for <junit> to work.

     Erik


On Aug 28, 2005, at 9:45 PM, Fuad Efendi wrote:

> Check version of ANT!
>
>
> Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
> dir="${basedir}"
>       errorProperty="tests.failed" failureProperty="tests.failed">
>
> nutch\trunk\build.xml:173: Could not create task or type of type:  
> junit.
>
>
> Probably, your current ANT configuration/version does not have such a
> task defined, <junit>
>
> Regards,
> Fuad Efendi
>
>
> -----Original Message-----
> From: AJ Chen [mailto:anjun.chen@sbcglobal.net]
> Sent: Sunday, August 28, 2005 9:01 PM
> To: nutch-dev
> Subject: junit test failed
>
>
> I'm a new comer, trying to test Nutch for vertical search. I  
> downloaded
> the code and compiled it in cygwin. But, the unit test failed with the
> following message:
>
> test-core:
>    [delete] Deleting directory nutch\trunk\build\test\data
>     [mkdir] Created dir: nutch\trunk\build\test\data
>
> BUILD FAILED
> nutch\trunk\build.xml:173: Could not create task or type of type:  
> junit.
>
> Did I miss anything for junit? Appreciate your help.
>
>
> AJ Chen
>
>
>
>


Re: junit test failed

Posted by AJ Chen <an...@sbcglobal.net>.
Fuad, thanks. problem solved.

Fuad Efendi wrote:

>I just reproduced it on my Windows XP, I had same problem with Ant 1.6.3
>
>It's not version problem (as mentioned by Erik Hatcher)
>
>I simly copied junit-3.8.1.jar file into apache-ant-1.6.3\lib
>Problem disappeared
>
>You should restore this file:
>ANT_HOME/lib/ant-junit.jar
>
>And, copy junit-3.8.1.jar file into apache-ant-1.6.3\lib
>
>
>
>-----Original Message-----
>From: AJ Chen [mailto:anjun.chen@sbcglobal.net] 
>Sent: Monday, August 29, 2005 12:00 AM
>To: nutch-dev@lucene.apache.org
>Subject: Re: junit test failed
>
>
>I'm using ant1.6.5, which has junit.jar in the ANT_HOME/lib.  I replace 
>the ANT_HOME/lib/ant-junit.jar with the latest junit-3.8.1.jar that 
>comes with Nutch.  But, it did not work.  I haven't seen anything like 
>"the optional tasks jar file" described in the instruction, though. Any 
>idea?
>
>Can someone also verify Nutch's build.xml defines the right classpath 
>element for junit task? 
>
>AJ
>
>
>
>Fuad Efendi wrote:
>
>  
>
>>http://ant.apache.org/manual/index.html
>>
>>JUnit
>>Description
>>This task runs tests from the JUnit testing framework. The latest 
>>version of the framework can be found at http://www.junit.org. This 
>>task has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't work 
>>with versions prior to JUnit 3.0.
>>
>>Note: This task depends on external libraries not included in the Ant 
>>distribution. See Library Dependencies for more information.
>>
>>Note: You must have junit.jar and the class files for the <junit> task 
>>in the same classpath. You can do one of:
>>
>>Put both junit.jar and the optional tasks jar file in ANT_HOME/lib.
>>Do not put either in ANT_HOME/lib, and instead include their locations
>>in your CLASSPATH environment variable. 
>>Do neither of the above, and instead, specify their locations using a
>><classpath> element in the build file. See the FAQ for details. 
>>
>>
>>
>>-----Original Message-----
>>From: Fuad Efendi [mailto:fuad@efendi.ca]
>>Sent: Sunday, August 28, 2005 9:45 PM
>>To: nutch-dev@lucene.apache.org; 'nutch-dev'
>>Subject: RE: junit test failed
>>
>>
>>Check version of ANT!
>>
>>
>>Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
>>dir="${basedir}"
>>     errorProperty="tests.failed" failureProperty="tests.failed">
>>
>>nutch\trunk\build.xml:173: Could not create task or type of type: 
>>junit.
>>
>>
>>Probably, your current ANT configuration/version does not have such a 
>>task defined, <junit>
>>
>>Regards,
>>Fuad Efendi
>>
>>
>>-----Original Message-----
>>From: AJ Chen [mailto:anjun.chen@sbcglobal.net]
>>Sent: Sunday, August 28, 2005 9:01 PM
>>To: nutch-dev
>>Subject: junit test failed
>>
>>
>>I'm a new comer, trying to test Nutch for vertical search. I downloaded
>>the code and compiled it in cygwin. But, the unit test failed with the 
>>following message:
>>
>>test-core:
>>  [delete] Deleting directory nutch\trunk\build\test\data
>>   [mkdir] Created dir: nutch\trunk\build\test\data
>>
>>BUILD FAILED
>>nutch\trunk\build.xml:173: Could not create task or type of type: 
>>junit.
>>
>>Did I miss anything for junit? Appreciate your help.
>>
>>
>>AJ Chen
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>>    
>>
>
>  
>

-- 
AJ (Anjun) Chen, Ph.D.
Canova Bioconsulting 
Marketing * BD * Software Development
748 Matadero Ave., Palo Alto, CA 94306, USA
Cell 650-283-4091, anjun.chen@sbcglobal.net
---------------------------------------------------

RE: junit test failed

Posted by Fuad Efendi <fu...@efendi.ca>.
I just reproduced it on my Windows XP, I had same problem with Ant 1.6.3

It's not version problem (as mentioned by Erik Hatcher)

I simly copied junit-3.8.1.jar file into apache-ant-1.6.3\lib
Problem disappeared

You should restore this file:
ANT_HOME/lib/ant-junit.jar

And, copy junit-3.8.1.jar file into apache-ant-1.6.3\lib



-----Original Message-----
From: AJ Chen [mailto:anjun.chen@sbcglobal.net] 
Sent: Monday, August 29, 2005 12:00 AM
To: nutch-dev@lucene.apache.org
Subject: Re: junit test failed


I'm using ant1.6.5, which has junit.jar in the ANT_HOME/lib.  I replace 
the ANT_HOME/lib/ant-junit.jar with the latest junit-3.8.1.jar that 
comes with Nutch.  But, it did not work.  I haven't seen anything like 
"the optional tasks jar file" described in the instruction, though. Any 
idea?

Can someone also verify Nutch's build.xml defines the right classpath 
element for junit task? 

AJ



Fuad Efendi wrote:

>http://ant.apache.org/manual/index.html
>
>JUnit
>Description
>This task runs tests from the JUnit testing framework. The latest 
>version of the framework can be found at http://www.junit.org. This 
>task has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't work 
>with versions prior to JUnit 3.0.
>
>Note: This task depends on external libraries not included in the Ant 
>distribution. See Library Dependencies for more information.
>
>Note: You must have junit.jar and the class files for the <junit> task 
>in the same classpath. You can do one of:
>
>Put both junit.jar and the optional tasks jar file in ANT_HOME/lib.
>Do not put either in ANT_HOME/lib, and instead include their locations
>in your CLASSPATH environment variable. 
>Do neither of the above, and instead, specify their locations using a
><classpath> element in the build file. See the FAQ for details. 
>
>
>
>-----Original Message-----
>From: Fuad Efendi [mailto:fuad@efendi.ca]
>Sent: Sunday, August 28, 2005 9:45 PM
>To: nutch-dev@lucene.apache.org; 'nutch-dev'
>Subject: RE: junit test failed
>
>
>Check version of ANT!
>
>
>Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
>dir="${basedir}"
>      errorProperty="tests.failed" failureProperty="tests.failed">
>
>nutch\trunk\build.xml:173: Could not create task or type of type: 
>junit.
>
>
>Probably, your current ANT configuration/version does not have such a 
>task defined, <junit>
>
>Regards,
>Fuad Efendi
>
>
>-----Original Message-----
>From: AJ Chen [mailto:anjun.chen@sbcglobal.net]
>Sent: Sunday, August 28, 2005 9:01 PM
>To: nutch-dev
>Subject: junit test failed
>
>
>I'm a new comer, trying to test Nutch for vertical search. I downloaded
>the code and compiled it in cygwin. But, the unit test failed with the 
>following message:
>
>test-core:
>   [delete] Deleting directory nutch\trunk\build\test\data
>    [mkdir] Created dir: nutch\trunk\build\test\data
>
>BUILD FAILED
>nutch\trunk\build.xml:173: Could not create task or type of type: 
>junit.
>
>Did I miss anything for junit? Appreciate your help.
>
>
>AJ Chen
>
>
>
>
>
>
>
>  
>

-- 
AJ (Anjun) Chen, Ph.D.
Canova Bioconsulting 
Marketing * BD * Software Development
748 Matadero Ave., Palo Alto, CA 94306, USA
Cell 650-283-4091, anjun.chen@sbcglobal.net
---------------------------------------------------


Re: junit test failed

Posted by AJ Chen <an...@sbcglobal.net>.
I'm using ant1.6.5, which has junit.jar in the ANT_HOME/lib.  I replace 
the ANT_HOME/lib/ant-junit.jar with the latest junit-3.8.1.jar that 
comes with Nutch.  But, it did not work.  I haven't seen anything like 
"the optional tasks jar file" described in the instruction, though. Any 
idea?

Can someone also verify Nutch's build.xml defines the right classpath 
element for junit task? 

AJ



Fuad Efendi wrote:

>http://ant.apache.org/manual/index.html
>
>JUnit
>Description
>This task runs tests from the JUnit testing framework. The latest
>version of the framework can be found at http://www.junit.org. This task
>has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't work with
>versions prior to JUnit 3.0.
>
>Note: This task depends on external libraries not included in the Ant
>distribution. See Library Dependencies for more information. 
>
>Note: You must have junit.jar and the class files for the <junit> task
>in the same classpath. You can do one of: 
>
>Put both junit.jar and the optional tasks jar file in ANT_HOME/lib. 
>Do not put either in ANT_HOME/lib, and instead include their locations
>in your CLASSPATH environment variable. 
>Do neither of the above, and instead, specify their locations using a
><classpath> element in the build file. See the FAQ for details. 
>
>
>
>-----Original Message-----
>From: Fuad Efendi [mailto:fuad@efendi.ca] 
>Sent: Sunday, August 28, 2005 9:45 PM
>To: nutch-dev@lucene.apache.org; 'nutch-dev'
>Subject: RE: junit test failed
>
>
>Check version of ANT! 
>
>
>Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
>dir="${basedir}"
>      errorProperty="tests.failed" failureProperty="tests.failed">
>
>nutch\trunk\build.xml:173: Could not create task or type of type: junit.
>
>
>Probably, your current ANT configuration/version does not have such a
>task defined, <junit>
>
>Regards,
>Fuad Efendi
>
>
>-----Original Message-----
>From: AJ Chen [mailto:anjun.chen@sbcglobal.net] 
>Sent: Sunday, August 28, 2005 9:01 PM
>To: nutch-dev
>Subject: junit test failed
>
>
>I'm a new comer, trying to test Nutch for vertical search. I downloaded 
>the code and compiled it in cygwin. But, the unit test failed with the 
>following message:
>
>test-core:
>   [delete] Deleting directory nutch\trunk\build\test\data
>    [mkdir] Created dir: nutch\trunk\build\test\data
>
>BUILD FAILED
>nutch\trunk\build.xml:173: Could not create task or type of type: junit.
>
>Did I miss anything for junit? Appreciate your help.
>
>
>AJ Chen
>
>
>
>
>
>
>
>  
>

-- 
AJ (Anjun) Chen, Ph.D.
Canova Bioconsulting 
Marketing * BD * Software Development
748 Matadero Ave., Palo Alto, CA 94306, USA
Cell 650-283-4091, anjun.chen@sbcglobal.net
---------------------------------------------------

RE: junit test failed

Posted by Fuad Efendi <fu...@efendi.ca>.
http://ant.apache.org/manual/index.html

JUnit
Description
This task runs tests from the JUnit testing framework. The latest
version of the framework can be found at http://www.junit.org. This task
has been tested with JUnit 3.0 up to JUnit 3.8.1; it won't work with
versions prior to JUnit 3.0.

Note: This task depends on external libraries not included in the Ant
distribution. See Library Dependencies for more information. 

Note: You must have junit.jar and the class files for the <junit> task
in the same classpath. You can do one of: 

Put both junit.jar and the optional tasks jar file in ANT_HOME/lib. 
Do not put either in ANT_HOME/lib, and instead include their locations
in your CLASSPATH environment variable. 
Do neither of the above, and instead, specify their locations using a
<classpath> element in the build file. See the FAQ for details. 



-----Original Message-----
From: Fuad Efendi [mailto:fuad@efendi.ca] 
Sent: Sunday, August 28, 2005 9:45 PM
To: nutch-dev@lucene.apache.org; 'nutch-dev'
Subject: RE: junit test failed


Check version of ANT! 


Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
dir="${basedir}"
      errorProperty="tests.failed" failureProperty="tests.failed">

nutch\trunk\build.xml:173: Could not create task or type of type: junit.


Probably, your current ANT configuration/version does not have such a
task defined, <junit>

Regards,
Fuad Efendi


-----Original Message-----
From: AJ Chen [mailto:anjun.chen@sbcglobal.net] 
Sent: Sunday, August 28, 2005 9:01 PM
To: nutch-dev
Subject: junit test failed


I'm a new comer, trying to test Nutch for vertical search. I downloaded 
the code and compiled it in cygwin. But, the unit test failed with the 
following message:

test-core:
   [delete] Deleting directory nutch\trunk\build\test\data
    [mkdir] Created dir: nutch\trunk\build\test\data

BUILD FAILED
nutch\trunk\build.xml:173: Could not create task or type of type: junit.

Did I miss anything for junit? Appreciate your help.


AJ Chen







RE: junit test failed

Posted by Fuad Efendi <fu...@efendi.ca>.
Check version of ANT! 


Line 173:    <junit printsummary="yes" haltonfailure="no" fork="yes"
dir="${basedir}"
      errorProperty="tests.failed" failureProperty="tests.failed">

nutch\trunk\build.xml:173: Could not create task or type of type: junit.


Probably, your current ANT configuration/version does not have such a
task defined, <junit>

Regards,
Fuad Efendi


-----Original Message-----
From: AJ Chen [mailto:anjun.chen@sbcglobal.net] 
Sent: Sunday, August 28, 2005 9:01 PM
To: nutch-dev
Subject: junit test failed


I'm a new comer, trying to test Nutch for vertical search. I downloaded 
the code and compiled it in cygwin. But, the unit test failed with the 
following message:

test-core:
   [delete] Deleting directory nutch\trunk\build\test\data
    [mkdir] Created dir: nutch\trunk\build\test\data

BUILD FAILED
nutch\trunk\build.xml:173: Could not create task or type of type: junit.

Did I miss anything for junit? Appreciate your help.


AJ Chen