首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能传输net.sourceforge.htmlunit:htmlunit

未能传输net.sourceforge.htmlunit:htmlunit
EN

Stack Overflow用户
提问于 2015-03-22 07:03:36
回答 1查看 963关注 0票数 1

我正在使用Selenium 2.44.0和新版TestNG。执行Maven构建后,将发生错误。这是我的pom.xml

代码语言:javascript
复制
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>STTA</groupId>
  <artifactId>MavenProject</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>MavenProject</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-java</artifactId>
      <version>2.44.0</version>
    </dependency>  
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.8.8</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

这是一个错误:

ArtifactTransferException:未能在本地存储库中缓存http://repo.maven.apache.org/maven2中的net.SourceAj.htmlUnit:htmlunit:jar:2.15,在中央更新间隔过去或强制更新之前,不会重新尝试解析。原始错误:无法将工件net.SourceForm.htmlUnit:htmlunit:jar:2.15从/转到中心(http://repo.maven.apache.org/maven2):60000之后没有收到响应

EN

回答 1

Stack Overflow用户

发布于 2017-01-17 15:09:44

在pom.xml中添加下面的依赖项。它起作用了

代码语言:javascript
复制
<dependency>
            <groupId>net.sourceforge.htmlunit</groupId>
            <artifactId>htmlunit</artifactId>
            <version>2.24</version>
</dependency>
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29191848

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档