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>

尝试使用不同的 maven 存储库 - 在你的 maven settings.xml - 放 http://central.maven.org/maven2/ - which definitely has mentioned jar

检查您是否 运行 支持公司代理。如果是,那么您可能需要在 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>