How to transfer credentials when connected to a nexus sonotype (anonymous login is disabled)?

In eclipse, the m2eclipse plugin will offer me my credentials when I create the maven2 project. And it compiles fine.

But if I try now to run "mvn install" from the command line, I get an artifact of an error not found. How to add username / password in my pom.xml to solve this problem.

+4
source share
3 answers

What user password are you talking about? If his username is defined in the nexus repository, you can specify in settings.xml where you defined the nexus repository.

 <servers> <server> <id>releases</id> <username>xxxxxxxxx</username> <password>yyyyyyyy</password> </server> </servers> 
+6
source

As far as I know, there are no maven xml tags to configure it. Of course, you can try the domain name prefix with username and password as follows:

 http://username: password@yournexusserver /.. 
+1
source

Maven will use the entries defined in your auth settings when prompted by Nexus. Just enter the server entry with the same identifier that you use for your repository (or a mirror if you use it), and that’s it.

+1
source

All Articles