As indicated here :
Maven projects already define the standard for design tests. And in my opinion, it makes no sense to make the project dependent on its tests - if anything, the tests will depend on the module being tested, since the tests use the module, but not vice versa.
, , : , . :
Maven . maven-surefire-plugin 2.15 Maven, . . , :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<dependenciesToScan>
<dependency>test.jar.group:test.jar.artifact.id</dependency>
</dependenciesToScan>
</configuration>
</plugin>