2

I want to add jcs to my maven project.

Under Configuration on the following page : http://commons.apache.org/proper/commons-jcs/faq.html

What jars are required by JCS?

As of verison 1.2.7.0, the core of JCS (the LRU memory cache, the indexed disk cache, the TCP lateral, and the RMI remote server) requires only two other jars. concurrent commons-logging Versions 1.2.6.9 and below also require the following two additional jars: commons-collections commons-lang All of the other dependencies listed on the project info page are for optional plugins.

When I add the jcs dependency (jcs version 1.3) to pom.xml , a lot of dependent jars are getting added to my classpath. I only need core jcs and its required dependencies, nothing more.

Is it possible to configure maven to have only the required dependencies and avoid the optional ones.

*Tried google for a solution , but could'nt find any information.

Community
  • 1
  • 1
ranjit
  • 158
  • 7

1 Answers1

0

What jars exactly are you talking about?

You should notice that you should use <groupId>org.apache.jcs</groupId> and not <groupId>jcs</groupId>which doesn't mark optional dependencies.

You should receive the following dependencies.

enter image description here

Notice that the dependencies under commons-logging are transitive dependencies and thus are not counted by JCS as direct dependencies.

If for some reason you'd like to remove any of those dependencies you can use maven exclusions

alonmo
  • 83
  • 6