You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by co...@runbox.com on 2003/12/24 03:11:29 UTC

Junit Plugin For Maven

Hi, could someone tell me where I can find the Junit Plugin for Maven-1.0-rc1?  At this time, I'm receiving the following error message:

BEGIN TRANSCRIPT:

$ maven test:test
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

java:prepare-filesystem:

java:compile:
    [echo] Compiling to c:\daven/target/classes
    [javac] Compiling 2 source files to C:\daven\target\classes
C:\daven\src\java\smartsoft\daven\BoxTest.java:3: package junit.framework does
ot exist
import junit.framework.TestCase;
                       ^
C:\daven\src\java\smartsoft\daven\BoxTest.java:5: cannot resolve symbol
symbol  : class TestCase
location: class smartsoft.daven.BoxTest
public class BoxTest extends TestCase {
                             ^
C:\daven\src\java\smartsoft\daven\BoxTest.java:9: cannot resolve symbol
symbol  : method assertEquals (int,int)
location: class smartsoft.daven.BoxTest
        assertEquals( 4, b.getArea() );
        ^
3 errors

BUILD FAILED
File...... file:/C:/Documents and Settings/CTaylor/.maven/plugins/maven-java-p
gin-1.3/
Element... ant:javac
Line...... 34
Column.... 48
Compile failed; see the compiler error output for details.
Total time: 5 seconds
Finished at: Tue Dec 23 17:56:52 PST 2003

END TRANSCRIPT:

Thanks in advance,

-Conrad

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Junit Plugin For Maven

Posted by Ben Walding <be...@walding.com>.
The reason you have that problem is because you have test cases in your 
main source tree.

JUnit is only added to the classpath for compiling test cases.

Hence, move your test cases to your test source tree OR specifically add 
junit to your dependency list.

The former is more appropriate. The latter is only useful if you are 
trying to define testcase subclasses that can be used in other projects.

conradwt@runbox.com wrote:

>Hi, could someone tell me where I can find the Junit Plugin for Maven-1.0-rc1?  At this time, I'm receiving the following error message:
>
>BEGIN TRANSCRIPT:
>
>$ maven test:test
> __  __
>|  \/  |__ _Apache__ ___
>| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT
>
>java:prepare-filesystem:
>
>java:compile:
>    [echo] Compiling to c:\daven/target/classes
>    [javac] Compiling 2 source files to C:\daven\target\classes
>C:\daven\src\java\smartsoft\daven\BoxTest.java:3: package junit.framework does
>ot exist
>import junit.framework.TestCase;
>                       ^
>C:\daven\src\java\smartsoft\daven\BoxTest.java:5: cannot resolve symbol
>symbol  : class TestCase
>location: class smartsoft.daven.BoxTest
>public class BoxTest extends TestCase {
>                             ^
>C:\daven\src\java\smartsoft\daven\BoxTest.java:9: cannot resolve symbol
>symbol  : method assertEquals (int,int)
>location: class smartsoft.daven.BoxTest
>        assertEquals( 4, b.getArea() );
>        ^
>3 errors
>
>BUILD FAILED
>File...... file:/C:/Documents and Settings/CTaylor/.maven/plugins/maven-java-p
>gin-1.3/
>Element... ant:javac
>Line...... 34
>Column.... 48
>Compile failed; see the compiler error output for details.
>Total time: 5 seconds
>Finished at: Tue Dec 23 17:56:52 PST 2003
>
>END TRANSCRIPT:
>
>Thanks in advance,
>
>-Conrad
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org