how to set pom.xml to download artifact from nexus remote repository

13,021

You have to add a repository section to your pom.

Here is an example:

<repositories>
    <repository>
        <id>browserid-snapshots</id>
        <name>browserid-snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

Taken from here https://github.com/user454322/browserid-verifier/blob/e7b81495882312c8cd9f1fb7e8313e239a6b3238/sample/pom.xml#L67-L73


Check the Repository section on the POM Reference for more info.

Share:
13,021
Anushka Ekanayake
Author by

Anushka Ekanayake

Programming is my life. But always i'm understanding there are lot of things to learn..:)

Updated on June 13, 2022

Comments

  • Anushka Ekanayake
    Anushka Ekanayake almost 2 years

    I want to set a remote nexus repository with my local repository in maven, when a artifact is not in the local repository, then it should be downloaded from my remote repository and should be installed to the local repository. How can I set it?