作为 httpunit 提交者之一,我建议使用 maven 依赖项。
M2Eclipse 插件将帮助您使用 maven:
https://www.eclipse.org/m2e/
从 2018-09 开始,您可以使用 httpunit 的 1.7.3 版本依赖项。然后自动解决所有其他依赖项。
<!-- https://mvnrepository.com/artifact/org.httpunit/httpunit -->
<dependency>
<groupId>org.httpunit</groupId>
<artifactId>httpunit</artifactId>
<version>1.7.3</version>
<scope>test</scope>
</dependency>
在https://mvnrepository.com/artifact/org.httpunit/httpunit你会发现最新版本。
如果您想找出 httpunit 自己的依赖项,您可以运行:
mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< org.httpunit:httpunit >------------------------
[INFO] Building HttpUnit 1.7.4-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ httpunit ---
[INFO] org.httpunit:httpunit:jar:1.7.4-SNAPSHOT
[INFO] +- rhino:js:jar:1.6R5:compile
[INFO] +- junit:junit:jar:4.10:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:compile
[INFO] +- nekohtml:nekohtml:jar:0.9.5:compile
[INFO] +- javax.servlet:servlet-api:jar:2.4:compile
[INFO] +- net.sf.jtidy:jtidy:jar:r938:compile
[INFO] +- xerces:xercesImpl:jar:2.6.1:compile
[INFO] +- xerces:xmlParserAPIs:jar:2.6.1:compile
[INFO] \- javax.mail:mail:jar:1.4:test
[INFO] \- javax.activation:activation:jar:1.1:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.670 s
[INFO] Finished at: 2019-06-15T15:07:46+02:00
[INFO] ------------------------------------------------------------------------