Il semble que quelque chose a changé dans le dépôt scala maven car j'obtiens une nouvelle erreur pour un projet qui fonctionnait auparavant. Si j'exécute sur ma propre machine, cela fonctionnera car j'ai un dossier .m2 qui a le jar manquant, mais lors de l'exécution sur une nouvelle machine (cercle ci), il échoue.
LOG:
<!-- 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>
Le pom ressemble à ceci:
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.
Je pense que c'est un nouveau problème - si quelqu'un a une solution de contournement que j'apprécierai
3 Réponses :
Le problème a été résolu en ajoutant une version au plugin 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>
Cette version particulière fonctionne là où 4.0.0 ne fonctionnait pas pour moi. Il fonctionnait auparavant sans avoir à indiquer explicitement la version.
J'ai rencontré le même problème, merci Ehud Lev d'avoir partagé sa solution.
Bienvenue dans Stack Overflow! Puisque vous rencontrez le même problème, envisagez de voter pour la question d'origine. Vous avez publié votre commentaire en guise de réponse. Consultez stackoverflow.com/help/how-to-answer pour obtenir des conseils. en donnant des réponses utiles.
<plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> <version>3.2.0</version> <execution> ...... ....... </executions> </plugin> "Added version tag"