未经代理授权的Maven

时间:2019-11-21 12:14:39

标签: java maven

我有一个项目专家。我有一个代理。

我的settings.xml maven代理是

<proxy>
        <active>true</active>
      <protocol>http</protocol>
      <host>proxy1.marm.es</host>
      <port>3128</port>
      </proxy>
    <proxy>
    <active>true</active>
      <protocol>https</protocol>
      <host>proxy1.marm.es</host>
      <port>3128</port>
      <nonProxyHosts>https://repo.maven.apache.org/maven2</nonProxyHosts>
     </proxy>
  </proxies>

我运行mvn -e install

我得到了错误

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.9.RELEASE from/to central (https://repo.maven.apache.org/maven2): Not authorized by proxy

如何在settings.xml中配置代理?

1 个答案:

答案 0 :(得分:0)

您需要提供用户名密码。

<username>proxyuser</username>
<password>somepassword</password>