I'm having some troubles trying to auto-clean each time i run mvn package. I've added in the POM :
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
...
</build>
But i'm getting the following error from M2Eclipse :
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-clean-plugin:2.5:clean (execution: auto-clean, phase: initialize)
I've tried other phases like "validate" or "generate-resources" but i'm always getting the same error.
It's not a Maven problem, it's m2eclipse. I haven't used it in a long time, but apparently when you add some plugin executions, you have to add additional configuration to m2eclipse. There's a lengthy description of this error on the Eclipse wiki.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With