Adding Maven Dependencies for Java Client
You can add the Maven dependencies for Java, as discussed below:
Maven Dependencies
You need to add the following Maven <dependency> section in your pom.xml file, which will add all the .jars to your application.
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-client</artifactId>
<version>x.x.x</version>
</dependency>
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Community-->
<artifactId>ncache-community-client</artifactId>
<version>x.x.x</version>
</dependency>
You can also add Maven Dependencies for the following Java Cache Integrations:
Java Web Sessions
- For Tomcat version 10 or less.
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-javax-sessions</artifactId>
<version>x.x.x</version>
</dependency>
- For Tomcat version 10+.
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-sessions</artifactId>
<version>x.x.x</version>
</dependency>
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Community-->
<artifactId>ncache-community-sessions</artifactId>
<version>x.x.x</version>
</dependency>
Hibernate
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-hibernate</artifactId>
<version>x.x.x</version>
</dependency>
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Community-->
<artifactId>ncache-community-hibernate</artifactId>
<version>x.x.x</version>
</dependency>
Spring
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-spring</artifactId>
<version>x.x.x</version>
</dependency>
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Community-->
<artifactId>ncache-community-spring</artifactId>
<version>x.x.x</version>
</dependency>
Spring Sessions
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-spring-session</artifactId>
<version>x.x.x</version>
</dependency>
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<!--for NCache Community-->
<artifactId>ncache-community-session</artifactId>
<version>x.x.x</version>
</dependency>
JCache
<dependency>
<groupId>com.alachisoft.ncache</groupId>
<artifactId>ncache-client</artifactId>
<version>x.x.x</version>
</dependency>
Supported Java Versions
The supported Java versions are as follows:
| Product | Versions |
|---|---|
| Java | 11, 17, 21 |