Appendix B. Maven Configuration Information
B.1. Install the JBoss Enterprise Application Platform Repository Using Nexus
This example outlines the steps to install the JBoss Enterprise Application Platform 7 Maven Repository using Sonatype Nexus Maven Repository Manager. For further instructions, see http://www.sonatype.org/nexus/.
Procedure: Download the JBoss Enterprise Application Platform 7 Maven Repository ZIP archive
- Open a web browser and access the following URL: https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=appplatform.
- Find Application Platform 7 Maven Repository in the list.
- Click Download to download a ZIP file that contains the repository.
- Unzip the files into the desired target directory.
Procedure: Add the JBoss Enterprise Application Platform 7 Maven Repository using Nexus Maven Repository Manager.. Log into Nexus as an Administrator.
- Select the Repositories section from the Repositories menu to the left of your repository manager.
- Click the Add… drop-down menu, then select Hosted Repository.
- Provide a name and ID for the new repository.
- Enter the unzipped repository path in the Override Local Storage Location field.
- Continue if the artifact must be available in a repository group. If not, do not continue with this procedure.
- Select the repository group.
- Click on the Configure tab.
Drag the new JBoss Maven repository from the Available Repositories list to the Ordered Group Repositories list on the left.
NoteThe order of this list determines the priority for searching Maven artifacts.
B.2. Maven Repository Configuration Example
A sample Maven repository file named example-settings.xml is available in the root directory of the Maven repository folder after it is unzipped. The following is an excerpt that contains the relevant parts of the example-settings.xml file:
Sample Maven Repository Configuration
<?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>JDG_REPOSITORY_URL</url> <layout>default</layout> <releases> <enabled>true</enabled> <updatePolicy>never</updatePolicy> </releases> <snapshots> <enabled>false</enabled> <updatePolicy>never</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-datagrid-repository</id> <name>JBoss Data Grid Maven Repository</name> <url>JDG_REPOSITORY_URL</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>
The JDG_REPOSITORY_URL
may be found by following the instructions in Determining the URL of the JBoss Data Grid Repository.
B.3. Determining the URL of the JBoss Data Grid Repository
The repository URL depends on where the repository is located. You can configure Maven to use any of the following repository locations:
- To use the online JBoss Data Grid Maven repository, specify the following URL: https://maven.repository.redhat.com/ga/
- To use a JBoss Data Grid Maven repository installed on the local file system, you must download the repository and then use the local file path for the URL. For example: file:///path/to/repo/jboss-datagrid-7.1.0-maven-repository/maven-repository/
- If you install the JBoss Data Grid Maven repository using the Nexus Repository Manager, the URL will look something like the following: https://intranet.acme.com/nexus/content/repositories/jboss-datagrid-7.1.0-maven-repository/maven-repository/