Maven 3 Junit 3 Tests Are Not Running

200 views Asked by At

Tools :

Maven 3

JUnit 3

Issue :

I have a legacy project which uses JUnit 3. I have created a new test module with src/test/java as project structure and added JUnits 3 classes inside it.

JUnits classes follow correct naming convention as - Test*.java

But when I run mvn clean test , maven is not picking up the tests.

It seems no tests to run message is also not coming given by maven-surefire-plugin

Can anybody please advice what is the issue here ?

I am really not able to find why tests are not picked up

1

There are 1 answers

0
Atul On

There was a mistake in pom.xml .

The packaging was declared as <packaging>pom</packaging>

The packaging is changed to jar and it started working