4.4. Locating Artifacts in a Fabric
Procedure for locating artifacts
Figure 4.3. How Containers Locate Artifacts in a Fabric
- The container contacts the fabric Maven proxy to search for the artifacts.
- The proxy searches for the artifacts in the fabric's system repository.This repository contains all of the artifacts provided with the Red Hat JBoss Fuse installation.
- If the artifacts are not available in system repository, the proxy searches the remote repositories specified in its configuration.See chapter "Configuring a Fabric's Maven Proxy" in "Configuring and Running JBoss Fuse" for details on how to configure a fabric's Maven proxy.
- The Maven proxy downloads the artifacts to the container.
Loading artifacts into the fabric's repository
- load the application's artifacts into the fabric's system repositoryMaven can upload artifacts directly to the fabric's system repository by adding a
repositoryelement defining the Maven proxy's repository to the POM's
distributionManagementelement. Example 4.3, “Adding a Fabric Maven Proxy to a POM” shows a POM entry for connecting to a fabric's repository when one of the Fabric Servers is running on the local machine.
Example 4.3. Adding a Fabric Maven Proxy to a POM
<distributionManagement> <repository> <id>fabric-maven-proxy</id> <name>FMC Maven Proxy</name> <url>http://username:password@localhost:8107/maven/upload/</url> </repository> </distributionManagement>You will need to modify the
urlelement to include the connection details for your environment:
NoteThe Red Hat JBoss Fuse Plugins for Eclipse can also be used to upload artifacts to a fabric's system repository. Red Hat JBoss Fuse Plugins for Eclipse will also generate a profile for deploying the application to a container.
- The username and password are the credentials used access the Fabric Server to which you are trying to connect.
- The hostname,
localhostin Example 4.3, “Adding a Fabric Maven Proxy to a POM”, is the address of the machine hosting the Fabric Server.
- The port number,
8107in Example 4.3, “Adding a Fabric Maven Proxy to a POM”, is the port number exposed by the Fabric Server.
8107is the default setting.
- The path,
/maven/upload/in Example 4.3, “Adding a Fabric Maven Proxy to a POM”, is the same for all Fabric Servers.
- load the application's artifacts to a custom repository and configure the fabric's Maven proxy to include the custom repositoryThis is a good option if an application is going to be used in multiple fabrics because you will not need to install the application into a separate repository for each fabric used. All of the fabrics will use a single, centrally located version of the application.To configure the fabric's Maven proxy see chapter "Configuring a Fabric's Maven Proxy" in "Configuring and Running JBoss Fuse".