I have a scenario where I need to run a test with JUnit on a feature that has an external dependency, but to run this functionality on the application server I need to put this external dependency in the exclusions group on my pom.xml
. But in the test I do not need / have the JBoss EAP 5 container started, which already has this dependency. And at this point the test blames that dependency is not available.
Below I put the dependency in question:
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>1.9.21</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>