【问题标题】:maven: Multiple annotations found at this line:maven:在此行找到多个注释:
【发布时间】:2017-12-16 21:02:17
【问题描述】:

我有一个非常简单的 maven 项目来运行一些 selenium 测试。这是我的pom.xml

<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>ignite</groupId>
  <artifactId>selenium</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>

        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-picocontainer</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>1.2.4</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.3.1</version>
        </dependency>


  </dependencies>
</project>

但它抱怨:

Multiple annotations found at this line:
    - Failure to transfer xalan:xalan:jar:2.7.2 from https://repo.maven.apache.org/maven2 was cached in the local 
     repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original 
     error: Could not transfer artifact xalan:xalan:jar:2.7.2 from/to central (https://repo.maven.apache.org/maven2): SOCKS : 
     authentication failed org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer xalan:xalan:jar:2.7.2 from 
     https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the 
     update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact xalan:xalan:jar:2.7.2 
     from/to central (https://repo.maven.apache.org/maven2): SOCKS : authentication failed at 

当我删除依赖时它工作正常

pom.xml 有什么问题?

【问题讨论】:

  • Original error: Could not transfer artifact xalan:xalan:jar:2.7.2 触发了这个
  • 找出触发它的依赖项并从中排除 xalan 至少是一种方式
  • 尝试删除目标文件夹并强制更新(按照Jimmy给出的步骤)

标签: java maven selenium


【解决方案1】:

经过以下步骤后问题得到解决:

  1. 右键单击项目
  2. Maven -> 更新 Maven 项目
  3. 勾选下面的复选框

【讨论】:

    猜你喜欢
    • 2015-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多