Loading...

users@maven.apache.org

[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. 

[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:testCompile (default-testCompile) on project mavenHelloWorld:
Compilation fa
ilure
[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
rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile
(default-testCom
pile) on project mavenHelloWorld: Compilation failure
\Users\_MavenProjects\mavenHelloWorld\src\test\java\com\mycompany\app\Te
stMe.java:[12,18] error: cannot find symbol

        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)

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: 
http://maven.40175.n5.nabble.com/Junit-ignored-by-Maven-tp5497051p5498506.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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