Most remote warehouses can be accessed without authentication, but sometimes in security considerations, we need to provide authentication information to access some remote repositories. To prevent illegal warehouse access, the administrator provides a set of user names and passwords for each warehouse.
In this case, in order for MAVEN to access the contents of the warehouse, the authentication information needs to be configured. Configuring authentication information differs from configuring warehouse information. The warehouse information can be configured directly in the POM, but the authentication information must be configured in the settings.xml. This is because the POM is often submitted to the code repository for access by all members, and settings.xml is typically placed only on this machine. Therefore, it is more secure to configure authentication information in Settings.xml.
Suppose you need to configure authentication information for a warehouse with an ID of my-proj, edit the settings.xml file in the following code listing:
<Servers><Server> <ID>my-proj</ID> <username>Admin</username> <Password>Pwd</Password></Server></Servers>
Above the ID my-proj warehouse configured A certification information, authentication User name: admin, authentication password: pwd.
Certification for MAVEN remote repositories