似乎在scala maven存储库中发生了一些变化,因为我得到了一个以前工作过的项目的新错误。如果我在自己的机器上运行,它会正常工作,因为我的.m2文件夹包含缺少的jar,但当在新机器上运行时(圈ci),它会失败。
日志:
ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:4.0.0:compile (scala-compile) on project my-project-name: Execution scala-compile of goal net.alchim31.maven:scala-maven-plugin:4.0.0:compile failed: For artifact {org.scala-sbt:compiler-bridge_2.11:null:jar}: The version cannot be empty. -> [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.pom如下所示:
<!-- scala plugins -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<!--<recompileMode>incremental</recompileMode>-->
<executions>
<execution>
<id>scala-compile</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>我认为这是一个新的问题-如果有人有解决办法,我将不胜感激
发布于 2019-03-03 20:17:06
问题已通过向maven插件添加版本修复:
<!-- scala plugins -->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.0.2</version>
<!--<recompileMode>incremental</recompileMode>-->
<executions>
<execution>
<id>scala-compile</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>发布于 2019-03-05 21:20:01
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.0</version>
<execution>
......
.......
</executions>
</plugin>“已添加版本标记”
发布于 2019-03-05 11:36:07
我也遇到了同样的问题,感谢Ehud Lev分享他的解决方案。
https://stackoverflow.com/questions/54967686
复制相似问题