maven 远程仓库:401 authentication

远程仓库认证

settings.xml

在 settings.xml 中配置认证用户名和密码, 就是 pom.xml 文件中

 <settings>
      ...
      <servers>
          <server>
              <id>repoIdid>
              <username>usernameusername>
              <password>passwordpassword>
          server>
      servers>
      ...
  settings>

pom.xml

 <repositories>
        <repository>
            <id>repoIdid>
            <name>repoNamename>
            <url>http://repository.xxx.com/maven/url>
        <repository>
 <repositories>

你可能感兴趣的:(maven,java)