我正在将应用程序移至Java11。我编写的集成测试已使用Junit 4成功运行。但是,当我使用Maven Failsafe插件运行相同的测试时,出现了多个无法解决的错误,如下所示:< / p>
java.nio.file.NoSuchFileException: C:\.m2\repository__\org\glassfish\ha\ha-api\3.1.9\config.jar
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
Failed to scan [file:/C:/.m2/repository__/org/glassfish/ha/ha-api/3.1.9/auto-depends.jar] from classloader hierarchy
java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:212)
java.nio.file.NoSuchFileException: C:\.m2\repository__\org\glassfish\ha\ha-api\3.1.9\auto-depends.jar
Failed to scan [file:/C:/.m2/repository__/org/glassfish/ha/ha-api/3.1.9/javax.inject.jar] from classloader hierarchy
java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:212)
Failed to scan [file:/C:/.m2/repository__/org/glassfish/ha/ha-api/3.1.9/asm-all-repackaged.jar] from classloader hierarchy
java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:212)
这些依赖项已经是我的maven项目的一部分。我无法弄清楚为什么Failsafe插件没有选择这些依赖项。请提出建议。