我正在开发一个使用 maven POM.xml 文件来构建的 Scala 项目。
添加导入“org.scalatest.FunSuite”或“...Matchers”的测试文件后构建失败,并显示错误消息“/packages 无法表示为 URI”
插件“scalatest-maven-plugin”在 pom.xml 中使用,但只要没有导入 FunSuite 或 Matchers,该文件就可以工作
pom 中的测试依赖项如下所示
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.binary.version}</artifactId>
<version>3.0.5</version>
<scope>test</scope>
</dependency>
斯卡拉版本:2.12.7
Maven版本:3.8.6
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
这是 Scala 编译器错误。请升级到最新的 Scala 点版本 2.12.16。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)