In pom.xml, the junit dependency should look like this so that junit is not carried with the artifact as a runtime dependency:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>