Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

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

<settings>
  <servers>
    <server>
      <id>my-repo</id>
      <username>myname</username>
      <password>******</password>
    </server>
  </servers>
</settings>

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

<distributionManagement>
    <repository>
        <id>my-repo</id>
        <url>http://my-repo.url</url>
    </repository>
</distributionManagement>
share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.