我有一个Maven项目,并在其中编写了一些Selenium TestNG程序。 Jenkins安装在Linux服务器上,而我试图从Jenkins运行Selenium测试时遇到此Maven错误,
[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.5 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for
org.apache.maven.plugins:maven-compiler-plugin:jar:3.5:
Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:3.5 from/to central (https://repo.maven.apache.org/maven2):
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/23.235.47.215] failed: Connection timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Build step 'Invoke top-level Maven targets' marked build as failure
答案 0 :(得分:0)
您的Jenkins服务器无法从Maven存储库下载依赖项。
错误消息中提到了这一点:
连接到repo.maven.apache.org:443 [repo.maven.apache.org/23.235.47.215]失败:连接超时
这可能是您服务器的临时连接问题,因此您可以再试一次。
如果此错误一直发生,请与您的网络管理员核实Jenkins服务器是否可以访问该主机名和端口,因为它可能被防火墙阻止。