Excluding JMS When Using OSCache in Maven
When upgrading from OSCache version 2.3 to 2.4, I found Maven complaining about the dependency on JMS. This is one of Sun's libraries that is not included int the repository. I'm not using JMS in my application (though I am using JMX, the need for 2.4) so, this is a bit of a pain.
The solution, define an exclusion in the dependency.
<dependency> <groupId>opensymphony</groupId> <artifactId>oscache</artifactId> <version>2.4</version> <scope>compile</scope> <!-- This excludes the transitive dependency on JMS --> <exclusions> <exclusion> <groupId>javax.jms</groupId> <artifactId>jms</artifactId> </exclusion> </exclusions> </dependency>