Automatic dependencies is one of the powerful feature of Apache maven and its one of the reason Maven is very popular in developer community.

Often, a project depends on a jar, which is not available on the public Maven repositories.

How to configure Sonatype Nexus repository with Maven? Configuring Maven with the credentials of this deployment user, so that it can interact correctly with Nexus, cannot be done in the pom.xml of the project. The article is illustrated with screenshots to guide the user in setting up a repository. A link ton how to setup a local Maven repository with the Nexus Maven repository … Maven resolve the dependent library from local repository which is again connected with central repository or remote repository. If you want use Nexus with Leiningen, first create two new Maven 2 proxy repositories in Nexus with the remote URL This is because the syntax of the pom doesn't allow it, not to mention the fact that the pom may be a public artifact, so … A local server for the Maven repository (such as Sonatype Nexus) can be used to store local Maven artifacts, and really will be useful to teams that develop modular applications, but are not going to publish modules to the public. Add TERASOLUNA Server Framework for Java (5.x) repository ¶ When an application is to be developed using TERASOLUNA Server Framework for Java (5.x), TERASOLUNA Server Framework for Java (5.x) repository needs to be added in addition to the above repositories. In that case, it is the most robust approach to define this … Change the Remote Storage Location value to On the same screen, go to the expanded Http Request Settings (optional) section and delete the Additional URL Parameters field contents specifying the Secure Central auth token. Sample Maven and Artifactory configuration is also shown. Then add both to your Maven 2 public group.

As a Nexus administrator, select your Central repository in the Nexus Repositories list and open the Configuration tab.

thus we can say that Maven has 3 kinds of repository … Public Repositories This group repository is used for enabling access to the above repositories through a single URL. You now should be able to use repositories from your repository in your local projects.
Configure Repository for Third Party Jars.

The example builder image supports MAVEN_MIRROR_URL as part of its environment, so we can use this to point our builder image to our Nexus repository.

Examples of Maven POM files which use this repository are shown.

One of these should have the Repository Policy set to Release and the other should have policy Snapshot.
If your image does not support consuming an environment variable to configure a Maven mirror, you may need to modify the builder image to provide the correct Maven settings to point to the Nexus mirror.