maven:在此行找到多个注释:

时间:2017-07-12 12:22:18

标签: java maven selenium

我有一个非常简单的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有什么问题?

1 个答案:

答案 0 :(得分:4)

按照以下步骤解决问题:

  1. 右键点击项目
  2. Maven - &gt;更新Maven项目
  3. 勾选下面的复选框
  4. enter image description here