这是 ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="com.ste" module="mod"/>
<configurations>
<conf name="binaries" description="binary jars"/>
</configurations>
<dependencies>
<dependency org="org.testng" name="testng" rev="6.8.5" conf="binaries->default"/>
<dependency org="org.seleniumhq.selenium" name="selenium-java" rev="2.38.0" conf="binaries->default"/>
<dependency org="org.json" name="json" rev="20080701" conf="binaries->default"/>
<dependency org="commons-jxpath" name="commons-jxpath" rev="1.3" conf="binaries->default"/>
</dependencies>
</ivy-module>
出现以下错误
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] module not found: org.testng#testng;6.8.5
[ivy:retrieve] :::: ERRORS
[ivy:retrieve] Server access error at url https://repo1.maven.org/maven2/org/te
stng/testng/6.8.5/testng-6.8.5.pom (javax.net.ssl.SSLHandshakeException: sun.sec
urity.validator.ValidatorException: PKIX path building failed: sun.security.prov
ider.certpath.SunCertPathBuilderException: unable to find valid certification pa
th to requested target)
BUILD FAILED
D:\code\testcases\StudioVoxAnt\build.xml:13: impossible to resolve dependencies:
请让我现在我做错了 提前致谢
我已经创建了lib文件夹和build.xml文件以及常春藤。
答案 0 :(得分:0)
无法重现您的问题。你在运行什么版本的Java?
这是我的构建文件:
<project name="demo" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="resolve" depends="install-ivy" description="Use ivy to resolve classpaths">
<ivy:resolve/>
</target>
</project>
答案 1 :(得分:0)
对于可能仍然存在此问题的任何人:我花了数小时试图使其正常工作,而我的问题又出在其他方面。在VPN后面,超时时间可能不够长,这将导致服务器访问错误。
尝试通过以下方式更新ivy.settings
中的超时时间
<timeout-constraint name="timeout1" connectionTimeout="300" readTimeout="1000"/>
此处有更多信息:official documentation