maven-scala-plugin giving pom file error
Solution 1
No, this is not a Maven bug. This page describes why the message is shown and how to deal with it.
After pressing Ctrl+1 over the problem Eclipse should suggest two quick fixes:
Discover new m2e connectors. Try this first, if it finds a connector restart Eclipse and rebuild the project, the problem should go away.
Permanently mark goal as ignored. It will add some code in
pom.xml
which means the goal won't be run on builds within Eclipse, only from command line. You can also replace<ignore>
in the added part with<execute>
to run the goal in Eclipse as well.
Solution 2
You should instal m2eclipse-connector from this update site: http://alchim31.free.fr/m2e-scala/update-site
Check this documentation:
http://scala-ide.org/docs/tutorials/m2eclipse/index.html
Solution 3
Post installation of m2e plugin (Maven Integration for Scala IDE) in eclipse, it worked well.
![blue-sky](https://i.stack.imgur.com/DzXRW.jpg?s=256&g=1)
Comments
-
blue-sky about 2 years
I'm testing java code using scala and maven. The maven-scala-plugin is returning a pom file error in Eclipse. Here is my pom snippet :
<plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <version>2.15.2</version> <executions> <execution> <id>scala-test-compile</id> <phase>test-compile</phase> <goals> <goal>testCompile</goal> </goals> </execution> </executions> </plugin>
This is the error :
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:testCompile (execution: scala-test-compile, phase: test-compile)
Have I configured the pom correctly ?
The scala tests are running correctly, in that they are all passing. Perhaps this is a Maven bug ?
When I view maven properties for the project the lifecycle mappings are not available :
-
blue-sky over 11 yearsFrom reading the doc it seems "execution: scala-test-compile, phase: test-compile" does not have a lifecycle mapping to any of the mapping metadata sources. So it seems I can just ignore the error. Is this correct ? Please see question edit
-
Gerbrand almost 11 yearsInstalling the right connector is better then ignoring the goal. That avoids the Maven build giving different results from the Eclipse build.
-
Josh Hansen over 10 yearsNeither of these suggestions are satisfactory --- the first does not find a connector; the second leads to your scala files not being built in Eclipse.
-
Alexey Romanov over 10 years@JoshHansen "You can also replace <ignore> in the added part with <execute> to run the goal in Eclipse as well."
-
Alexey Romanov over 10 years@JoshHansen Also see user2635460's answer, there is a connector now.