The Tanzu GemFire libraries are available from the Broadcom Customer Support Portal.
Modify your project’s pom.xml
file by adding the following repository definition:
<repository>
<id>gemfire-release-repo</id>
<name>GemFire Release Repository</name>
<url>https://packages.broadcom.com/artifactory/gemfire/</url>
</repository>
To access the artifacts, you must add an entry to your .m2/settings.xml
file:
<settings>
<servers>
<server>
<id>gemfire-release-repo</id>
<username>EXAMPLE-USERNAME</username>
<password>MY-PASSWORD</password>
</server>
</servers>
</settings>
Where:
EXAMPLE-USERNAME
is your support.broadcom.com user name.MY-PASSWORD
is the Access Token you copied in step 3 in Prerequisites.After setting up the repository and credentials, add the Spring Session for GemFire library to your application. To support multiple GemFire versions, the Spring Session for GemFire library requires users to specify an explicit dependency on the desired version of GemFire.
In the following examples:
springSessionForGemFire.version
with the version of the library that your project requires.vmwareGemFire.version
with the version of GemFire that your project requires.<artifactId>spring-session-3.3-gemfire-10.1</artifactId>
with the version of Spring Session + the version of GemFire your application requires.Add the following to your pom.xml
file:
<properties>
<springSessionForGemFire.version>1.0.0</springSessionForGemFire.version>
<vmwareGemFire.version>10.1.1</vmwareGemFire.version>
</properties>
<dependencies>
<dependency>
<groupId>com.vmware.gemfire</groupId>
<artifactId>spring-session-3.3-gemfire-10.1</artifactId>
<version>${springSessionForGemFire.version}</version>
</dependency>
<dependency>
<groupId>com.vmware.gemfire</groupId>
<artifactId>gemfire-core</artifactId>
<version>${vmwareGemFire.version}</version>
</dependency>
<!--if using continuous queries-->
<dependency>
<groupId>com.vmware.gemfire</groupId>
<artifactId>gemfire-cq</artifactId>
<version>${vmwareGemFire.version}</version>
</dependency>
</dependencies>
NOTE: The server dependencies are only required if the user is starting an embedded GemFire server using Spring.
Add the following to your pom.xml
file:
<properties>
<springSessionForGemFire.version>1.0.0</springSessionForGemFire.version>
<vmwareGemFire.version>10.1.1</vmwareGemFire.version>
</properties>
<dependencies>
<dependency>
<groupId>com.vmware.gemfire</groupId>
<artifactId>spring-session-3.3-gemfire-10.1</artifactId>
<version>${springSessionForGemFire.version}</version>
</dependency>
<dependency>
<groupId>com.vmware.gemfire</groupId>
<artifactId>gemfire-server-all</artifactId>
<version>${vmwareGemFire.version}</version>
<exclusions>
<exclusion>
<groupId>com.vmware.gemfire</groupId>
<artifactId>gemfire-log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Your application is now ready to connect with your GemFire instance.
Add the following block to the repositories
section of the build.gradle
file:
repositories {
maven {
credentials {
username "gemfireRepoUsername"
password "gemfireRepoPassword"
}
url = uri("https://packages.broadcom.com/artifactory/gemfire/")
}
}
Add your credentials to the local .gradle/gradle.properties
or project gradle.properties
file.
gemfireRepoUsername=MY-USERNAME
gemfireRepoPassword=MY-PASSWORD
Where:
EXAMPLE-USERNAME
is your support.broadcom.com username.MY-PASSWORD
is the Access Token you copied in step 3 in Prerequisites.After setting up the repository and credentials, add the Spring Session for GemFire library to your application. To support multiple GemFire versions, the Spring Session for GemFire library requires users to specify an explicit dependency on the desired version of GemFire.
In the following examples:
springSessionForGemFire.version
with the version of the library that your project requires.vmwareGemFire.version
with the version of GemFire that your project requires.spring-session-3.3-gemfire-10.1
with the version of Spring Session + the version of GemFire your application requires.Add the following to your build.gradle
file.
ext {
springSessionForGemFireVersion = '1.0.0'
vmwareGemFireVersion = '10.1.1'
}
dependencies {
implementation "com.vmware.gemfire:spring-session-3.3-gemfire-10.1:$springSessionForGemFireVersion"
implementation "com.vmware.gemfire:gemfire-core:$vmwareGemFireVersion"
// if using continuous queries
implementation "com.vmware.gemfire:gemfire-cq:$vmwareGemFireVersion"
}
NOTE: The server dependencies are only required if the user is starting an embedded GemFire server using Spring.
ext {
springSessionForGemFireVersion = '1.0.0'
vmwareGemFireVersion = '10.1.1'
}
dependencies {
implementation "com.vmware.gemfire:spring-session-3.3-gemfire-10.1:$springSessionForGemFireVersion"
implementation ("com.vmware.gemfire:gemfire-server-all:$vmwareGemFireVersion"){
exclude group: 'com.vmware.gemfire', module: 'gemfire-log4j'
}
}