Seems that something has changed in the scala maven repository cause I get a new error for a project that worked before. If I am running on my own machine it will work since I have .m2 folder that has the missing jar, but when running on a new machine (circle ci) it fails.
LOG:
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.
The pom looks as follows:
<!-- 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>
I think this is a new issue - if someone has a workaround I will appreciate
Problem was fixed by adding version to maven plugin:
<!-- 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>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.0</version>
<execution>
......
.......
</executions>
</plugin>
"Added version tag"
我遇到了同样的问题,谢谢Ehud Lev分享了他的解决方案。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.