I have a Maven project setup. In the project, am using JUnit in for unit testing. When I run tests with mvn test
or mvn clean test
, no tests are run. Tests are in src/test/java
and they all end in Test
(they match *Test.java
).
This is my pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.9</source>
<target>1.9</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
<groupId>org.astropeci.ppp4e</groupId>
<artifactId>ppp4e</artifactId>
<version>1.0</version>
</project>
My entire project structure can be seen here: https://bitbucket.org/equator-lang/ppp4e/src/master/
Any help would be greatly appreciated as I have been trying for many hours to get this to work and have no idea what to do.
EDIT:
After making a test class public, the Maven response changed from:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
To:
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.astropeci.ppp4e.defaultimpl.internal.lexing.MultiplexedTokenBuilderTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0