Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

PREREQUISITES

Panel

How to configure a Maven pom.xml to access a remote Maven repository

PREREQUISITES

panel
indent
11
Before you begin, you must have the following:

Before you begin, you must have the following:



  • You must have installed the Maven repository client on your workstation. Click here to get the lastest version of maven.

Panel

These instuctions assume the following:

  • The name of the Nexus Repository server is maven.mit.edu.  The actual server name may be different.

...

Panel

The M.I.T. public repositories can be accessed by using either http or https. If you want to use https, then you must enable Maven for SSL operations.

1. The pom.xml <repositories> element

Panel

To access a remote maven repository, add a <repositories> element to the Maven project's pom.xml.

For example, to use the Public M.I.T. Maven Repositories, add the following to Maven project pom.xml.

Code Block
<project>
    ...
    <repositories>
        <repository>
            <id>PublicMitRepositoriesGroup</id>
            <name>PublicMitRepositoriesGroup</name>
            <url>https://maven.mit.edu/nexus/content/groups/PublicMitRepositoriesGroup</url>
        </repository>
    </repositories>
    ...
</project>