Maven Repositories: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 47: Line 47:
=Using Maven Repositories when Compiling JBoss EAP=
=Using Maven Repositories when Compiling JBoss EAP=


Note that in some cases, multiple maven repositories are required, as with JDG 7 which relies on EAP 7. An example on how to configure that is available here:
Note that in some cases, multiple maven repositories are required, as with JDG 7 which relies on EAP 7:
 
<pre>
...
<profiles>
    <profile>
        <id>jdg7</id>
        <repositories>
            <repository>
                <id>jboss-eap-7.0.0.GA-maven</id>
                <url>file:///Users/ovidiu/runtime/jboss-eap-7.0.0.GA-maven-repository/maven-repository</url>
            </repository>
            <repository>
                <id>jboss-datagrid-7.0-maven</id>
                <url>file:///Users/ovidiu/runtime/jboss-datagrid-7.0.0-maven-repository/maven-repository</url>
            </repository>
        </repositories>
        <properties>
            <infinispan-version>8.3.0.Final-redhat-1</infinispan-version>
        </properties>
    </profile>
</profiles>
...
</pre>
 
A full example on how to configure that is available here:


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
:https://github.com/NovaOrdis/playground/blob/master/jboss/infinispan/hotrod-client/pom.xml<br>
:https://github.com/NovaOrdis/playground/blob/master/jboss/infinispan/hotrod-client/pom.xml<br>
</blockquote>
</blockquote>

Revision as of 20:00, 26 October 2016

External

Internal

Overview

A repository is used to hold build artifacts and dependencies of varying types. There are only two types of repositories: local and remote.

A local repository is a cache of the remote downloads and also contains temporary build artifacts.

A remote repository is accessed over a network protocol such as http:// or even file://. They may be set up by other organizations, or by your own organization in order to share artifacts between different development teams.

Adding a Remote Repository

Both "http://" and "file://" work.

A generic http repository:

...
<repositories>
    <repository>
        <id>my-internal-site</id>
        <url>http://myserver/repo</url>
    </repository>
</repositories>
...

This is an example of adding a local EAP repository:

...
<repositories>
    <repository>
        <id>jboss-datagrid-6.6.0-maven-repository</id>
        <url>file:///Users/ovidiu/runtime/jboss-datagrid-6.6.0-maven-repository</url>
    </repository>
</repositories>
...

Using Maven Repositories when Compiling JBoss EAP

Note that in some cases, multiple maven repositories are required, as with JDG 7 which relies on EAP 7:

...
<profiles>
    <profile>
        <id>jdg7</id>
        <repositories>
            <repository>
                <id>jboss-eap-7.0.0.GA-maven</id>
                <url>file:///Users/ovidiu/runtime/jboss-eap-7.0.0.GA-maven-repository/maven-repository</url>
            </repository>
            <repository>
                <id>jboss-datagrid-7.0-maven</id>
                <url>file:///Users/ovidiu/runtime/jboss-datagrid-7.0.0-maven-repository/maven-repository</url>
             </repository>
        </repositories>
        <properties>
            <infinispan-version>8.3.0.Final-redhat-1</infinispan-version>
        </properties>
    </profile>
</profiles>
...

A full example on how to configure that is available here:

https://github.com/NovaOrdis/playground/blob/master/jboss/infinispan/hotrod-client/pom.xml