[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: Junit ignored by Maven Gogirl Mon Feb 20 01:00:52 2012

Hi Wayne:
I am not sure how many are running parallel versions of junit. As mentioned,
JUnit has two important distinct versions: JUnit 3, the traditional library
and JUnit 4, a complete redesign. I saw Maven run some JUnit 3 examples and
not JUnit 4, before it refused to compile and run any. I had misunderstood
the part that a provider is needed in the pom. It does not seem so but as I
wrote removing it did not do much. 

[ERROR] Failed to execute goal
3.2:testCompile (default-testCompile) on project mavenHelloWorld:
Compilation fa
[ERROR] \Users\_MavenProjects\mavenHelloWorld\src\test\java\com\mycompan
y\app\TestMe.java:[12,18] error: cannot find symbol
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
goal o
pile) on project mavenHelloWorld: Compilation failure
stMe.java:[12,18] error: cannot find symbol


File used:
package com.mycompany.app;
import junit.framework.*;

public class TestMe extends TestCase {

  public void testAdd() { 
        int num1 = 3; 
        int num2 = 2; 
        int total = 5; 
        int sum = 0; 
        sum = Math.add(num1, num2); 
        assertEquals(sum, total); 

View this message in context: 
Sent from the Maven - Users mailing list archive at Nabble.com.

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