I'am trying to test a class with Jnuit 4 in a maven project. The test runs successfully when I run it from my STS, but when I try to run it from maven command line, I get the following error: annotations are not supported in -source 1.3 (use -source 5 or higher to enable annotations) @Before
Code under test is:
public class MyContollerTest{ @Before public void setup(){ System.out.println("This is MyControllerTest before..."); } @Test public void testShouldTest(){ System.out.println("This is MyControllerTest"); } @After public void tearDown(){ System.out.println("This is MyControllerTest after..."); } } I'm using the Junit 4.8.1 as maven dependecy
I have checked my complience level is 1.6 and I'm using jdk 1.6