简体   繁体   中英

Maven 3 Junit 3 Tests Are Not Running

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM