I cant seem to work this out (or maybe its just late!) - I installed Nexus and disabled anonymous access as I intend to proxy nexus on the web. It makes sense that there should be some manner to authenticate against the nexus repository, but I cant find anywhere to configure this.

Any help?

To be clear, from the client when we do mvn there must be some manner to authenticate against the maven repository. This is the piece that is alluding me at this time.

2 Answers 2


You should have a file named settings.xml under $HOME/.m2 (under unix, no idea about windows) with the following content


where my-repo is the id of the repository in your pom.xml:

  • is there a possibility to globally apply the server settings so that you don't have to modify all the pom.xml ?
    – bzero
    Commented Dec 7, 2022 at 12:02

You add a server to your settings and that should have a username and password.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .