繁体   English   中英

Maven jar插件-无法读取工件描述符

[英]Maven jar plugin - Failed to read artifact descriptor

我正在尝试通过Teamcity在另一台服务器上运行Selenium测试。 项目开始编译,但是maven.jar.plugin错误。

Plugin org.apache.maven.plugins:maven-jar-plugin:3.1.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar:3.1.0: Could not transfer artifact org.apache.maven.plugins:maven-jar-plugin:pom:3.1.0 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.112.215] failed

最初,我在那里有2.4版本,但后来尝试将其更改为该版本,但也失败了。 因此,两者都不起作用。

当然,如果我手动运行测试-在本地运行,一切正常。

我通过调用mvn clean verify运行测试

非常感谢您的帮助,如果您需要更多信息,请告诉我。

这是我的pom.xml的插件:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>3.1.0</version>
    <executions>
      <execution>
        <goals>
          <goal>test-jar</goal>
        </goals>
      </execution>
    </executions>
  </plugin>

检查您是否在公司代理后面运行。 如果是,那么您可能需要在settings.xml中添加组织的代理设置。

<settings>
  <proxies>
   <proxy>
      <id>SOME ID</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>PROXY_HOST</host>
      <port>PROXY_PORT</port>
    </proxy>
  </proxies>
</settings>

尝试在您的maven settings.xml中使用不同的Maven存储库-放置http://central.maven.org/maven2/-肯定提到了jar

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM