Java 无法执行目标org.apache.maven.plugins:maven surefire plugin:2.12.4:

Java 无法执行目标org.apache.maven.plugins:maven surefire plugin:2.12.4:,java,eclipse,maven,Java,Eclipse,Maven,我一直得到下面的错误。错误似乎与某种插件有关,但我已将该插件添加到pom.xml文件中。正如您所看到的,它仍然返回相同的错误。我正在运行maven并进行一次干净的安装。错误依然存在,似乎无法找到解决方法。任何帮助都将不胜感激 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/MichaelC/Desktop/eclipse/plugins/org.ecli

我一直得到下面的错误。错误似乎与某种插件有关,但我已将该插件添加到pom.xml文件中。正如您所看到的,它仍然返回相同的错误。我正在运行maven并进行一次干净的安装。错误依然存在,似乎无法找到解决方法。任何帮助都将不胜感激

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/MichaelC/Desktop/eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/958/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/MichaelC/Desktop/eclipse/plugins/org.eclipse.m2e.maven.runtime.slf4j.simple_1.16.0.20200610-1735/jars/slf4j-simple-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/958/0/.cp/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------------< qub:student >-----------------------------
[INFO] Building student 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ student ---
[INFO] Deleting C:\Users\MichaelC\eclipse-workspace\student-service\target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ student ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\MichaelC\eclipse-workspace\student-service\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ student ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to C:\Users\MichaelC\eclipse-workspace\student-service\target\classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ student ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\MichaelC\eclipse-workspace\student-service\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ student ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ student ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.062 s
[INFO] Finished at: 2021-04-27T01:01:40+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project student: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Cannot access https://repo.maven.apache.org/maven2 with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://repo.maven.apache.org/maven2 using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.wagon.Wagon
[ERROR]   roleHint: https
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/C:/Users/MichaelC/Desktop/eclipse/plugins/org.eclipse.m2e.maven.runtime.SLF4J.simple_1.16.0.20200610-1735/jars/SLF4J-simple-1.7.5.jar!/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/958/0/.cp/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:参见http://www.slf4j.org/codes.html#multiple_bindings 我需要一个解释。
SLF4J:实际绑定的类型为[org.SLF4J.impl.SimpleLoggerFactory]
SLF4J:类路径包含多个SLF4J绑定。
SLF4J:在[jar:file:/C:/Users/MichaelC/Desktop/eclipse/plugins/org.eclipse.m2e.maven.runtime.SLF4J.simple_1.16.0.20200610-1735/jars/SLF4J-simple-1.7.5.jar!/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/5/0/.cp/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:在[file:/C:/Users/MichaelC/Desktop/eclipse/configuration/org.eclipse.osgi/958/0/.cp/org/SLF4J/impl/StaticLoggerBinder.class]中找到绑定
SLF4J:参见http://www.slf4j.org/codes.html#multiple_bindings 我需要一个解释。
SLF4J:实际绑定的类型为[org.SLF4J.impl.SimpleLoggerFactory]
[信息]正在扫描项目。。。
[信息]
[信息]-----------------------------------------------------------------
[信息]正在构建学生0.0.1-SNAPSHOT
[信息]------------------------------------[战争]---------------------------------
[信息]
[信息]---maven clean插件:2.5:clean(默认清洁)@student---
[信息]删除C:\Users\MichaelC\eclipse workspace\student service\target
[信息]
[信息]---maven资源插件:2.6:resources(默认资源)@student---
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的资源目录C:\Users\MichaelC\eclipse workspace\student service\src\main\resources
[信息]
[信息]---maven编译器插件:3.1:compile(默认编译)@student---
[信息]检测到更改-重新编译模块!
[INFO]正在将6个源文件编译为C:\Users\MichaelC\eclipse workspace\student service\target\classes
[信息]
[信息]---maven资源插件:2.6:testResources(默认testResources)@student---
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的资源目录C:\Users\MichaelC\eclipse workspace\student service\src\test\resources
[信息]
[信息]---maven编译器插件:3.1:testCompile(默认testCompile)@student---
[信息]没有要编译的源
[信息]
[信息]---maven surefire插件:2.12.4:test(默认测试)@student---
[信息]------------------------------------------------------------------------
[信息]生成失败
[信息]------------------------------------------------------------------------
[信息]总时间:1.062秒
[信息]完成时间:2021-04-27T01:01:40+01:00
[信息]------------------------------------------------------------------------
[错误]无法执行目标org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test(默认测试)项目学生:执行目标org.apache.maven的默认测试。插件:maven surefire插件:2.12.4:测试失败:插件org.apache.maven。插件:maven surefire插件:2.12.4或其一个依赖项无法解析:未能在org.apache.maven收集依赖项。插件:maven surefire插件:jar:2.12.4->org.apache.maven.surefire:surefire booter:jar:2.12.4:无法读取org.apache.maven.surefire:surefire booter:jar:2.12.4:无法将项目org.apache.maven.surefire:surefire booter:pom:2.12.4从/传输到中心(https://repo.maven.apache.org/maven2):无法访问https://repo.maven.apache.org/maven2 使用可用的连接器工厂:BasicRepositoryConnectorFactory:无法访问https://repo.maven.apache.org/maven2 使用已注册的transporter工厂:WagoTransporterFactory:java.util.NoSuchElementException
[错误]角色:org.apache.maven.wagen.wagen
[错误]角色提示:https
[错误]->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完整调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>qub</groupId>
    <artifactId>student</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>7</maven.compiler.source>
        <maven.compiler.target>7</maven.compiler.target>
    </properties>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt -->
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>2.2.6</version>
        </dependency>
        <dependency>
            <groupId>com.sun.org.apache.xml.internal</groupId>
            <artifactId>resolver</artifactId>
            <version>20050927</version>
        </dependency>
    </dependencies>


    <build>
        <sourceDirectory>src</sourceDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>3.2.3</version>
                <configuration>
                    <warSourceDirectory>WebContent</warSourceDirectory>
                </configuration>
            </plugin>
            
        </plugins>
    </build>
</project>

4.0.0
库布

试试mvn-Dhttps.protocols=TLSv1.2干净安装
(来自)