Maven Repositories: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 16: Line 16:


=Adding a Remote Repository=
=Adding a Remote Repository=
Both "http://" and "file://" work.
A generic http repository:


<pre>
<pre>
Line 23: Line 27:
         <id>my-internal-site</id>
         <id>my-internal-site</id>
         <url>http://myserver/repo</url>
         <url>http://myserver/repo</url>
    </repository>
</repositories>
...
</pre>
This is an example of adding a local EAP repository:
<pre>
...
<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>
     </repository>
</repositories>
</repositories>
...
...
</pre>
</pre>

Revision as of 23:15, 14 July 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>
...