pom.xml 有问题

Having issue with pom.xml

我正在尝试将 Selenium TestNG 集成到 Maven,但在向 pom.xml 添加依赖项时遇到了问题(如本 article 中所述),并且在同一方面出现错误。只有当我添加 selenium 和 testng 依赖项时才会出现问题,我已经将这些库导入到项目中。下面是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>ProV1</groupId>
      <artifactId>ProV1</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.1</version>
                        <configuration>
                            <source>1.7</source>
                            <target>1.7</target>
                        </configuration>
                    </plugin>
                </plugins>
       </build>
       <dependencies>            
           <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.12</version>
          <scope>test</scope>
        </dependency>
            <dependency>              
                <groupId>org.seleniumhq.selenium</groupId>                              
                <artifactId>selenium-server</artifactId>                              
                <version>2.47.1</version>                               
            </dependency>             
            <dependency>              
                <groupId>org.testng</groupId>                               
                <artifactId>testng</artifactId>                             
                <version>6.9.5</version>                              
                <scope>test</scope>                                     
           </dependency>              
        </dependencies>
    </project>

这就是我遇到的错误 正如一些文章中所建议的那样,我清理了项目,刷新了但没有任何结果。 我是 Maven 的新手,所以非常感谢所有有关如何解决此问题的有用建议。

问题已通过删除依赖项解决,无需添加依赖项。 Maven 会自动添加它们。