3.4. Configure the Maven Repository


To configure the installed Red Hat JBoss Data Grid Maven repository, edit the settings.xml file. This file may be configured in one of two locations:
  1. User level - Maven user settings are located in the ${user.home}/.m2/ directory:
    • For Linux or Mac environments this is typically ~/.m2/
    • For Windows environments this is typically \Documents and Settings\.m2\ or \Users\.m2\
  2. Global level - Settings for all users on a machine, assuming they are all using the same Maven installation, is typically provided in ${maven.home}/conf/settings.xml
See Section B.2, “Maven Repository Configuration Example” to view sample Maven configurations, and refer to the Maven Documentation for more information about configuring Maven.
In certain environments it is preferred to have the Maven repository available offline. To accomplish this configuration perform the following steps:
Prerequisites:

  • The JBoss Data Grid Maven repository has been downloaded to the internal network where it will be referenced.
  • An internal repository, such as Sonatype Nexus or Apache Archiva, is available on the network that contains Maven dependencies.

Procedure 3.2. Configure the JBoss Data Grid Maven Repository for Offline Usage

  1. Install the downloaded JBoss Data Grid Maven repository locally, following the instructions in Section 3.3.1, “Local File System Repository Installation”.
  2. Update the settings.xml to point to the locally extracted repository, as seen in Section 3.4, “Configure the Maven Repository”. A sample configuration is shown below:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    
       <profiles>
          <profile>
             <id>jboss-datagrid-repository</id>
             <repositories>
                <repository>
                   <id>jboss-datagrid-repository</id>
                   <name>JBoss Data Grid Maven Repository</name>
                   <url>file:///path/to/jboss-datagrid-7.0.0.GA-maven-repository/maven-repository</url>
                   <layout>default</layout>
                   <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                   </releases>
                   <snapshots>
                      <enabled>false</enabled>
                      <updatePolicy>never</updatePolicy>
                   </snapshots>
                </repository>
             <pluginRepositories>
                <pluginRepository>
                   <id>jboss-datagrid-repository</id>
                   <name>JBoss Data Grid Maven Repository</name>
                   <url>file:///path/to/jboss-datagrid-7.0.0.GA-maven-repository/maven-repository</url>
                   <layout>default</layout>
                   <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                   </releases>
                   <snapshots>
                      <enabled>false</enabled>
                      <updatePolicy>never</updatePolicy>
                   </snapshots>
                </pluginRepository>
             </pluginRepositories>
          </profile>
       </profiles>
       <activeProfiles>
          <!-- make the profile active by default -->
          <activeProfile>jboss-datagrid-repository</activeProfile>
       </activeProfiles>
    
    </settings>
    Copy to Clipboard Toggle word wrap
  3. Ensure that projects may now be built locally.

3.4.2. Next Steps

After the newest available version of Red Hat JBoss Data Grid is installed and Maven is set up and configured, see Section 9.1, “Create a New Red Hat JBoss Data Grid Project” to learn how to use JBoss Data Grid for the first time.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat