I have a repository configured in Nexus that contains projects that are not for public release, but need access from a variety of sites so cannot host it on my LAN. I've therefore put it on a public server and set up the repository in Nexus to require username/password access, which is working fine. But I can't figure out where to put the configuration information for Maven to access this repository... Nexus doesn't seem to understand HTTP basic authentication, so I can't use an http://username:password@host/
URL format for the job. So what can I do to make this work?
All you have to do is set a server element in settings.xml with your username and password and an id.
For deployment rights use that id in the distributionManagement of your pom file for the snapshotRepository and repository.
For access rights via read you typically do that via a public group and use that same id in the mirror as defined in the settings file. See an example at http://books.sonatype.com/nexus-book/reference/config-maven.html
Now if you want to give access to something only for authenticated users like yourself you create a repository target for that group and then give the appropriate security rights to your user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With