m2e 中未涵盖 yuicompressor 插件执行
经过长时间搜索我可以在 Maven 中使用的 JavaScript 压缩器,我终于找到了一个:
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<jswarn>false</jswarn>
</configuration>
</plugin>
现在在 Eclipse 中的最新版本的 m2e 中,我收到以下错误:
生命周期配置未涵盖插件执行:net.alchim31.maven:yuicompressor-maven-plugin:1.1:compress(执行:默认,阶段:进程资源)
可爱。我不明白——这只是一个插件。为什么 m2e 不能简单地调用我拥有的任何旧插件?这有什么问题吗?我该如何解决这个问题?
After a long search for a JavaScript compressor I could use in Maven, I finally found one:
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<jswarn>false</jswarn>
</configuration>
</plugin>
Now in the latest version of m2e in Eclipse, I get the following error:
Plugin execution not covered by lifecycle configuration: net.alchim31.maven:yuicompressor-maven-plugin:1.1:compress (execution: default, phase: process-resources)
Lovely. I don't get it---it's just a plugin. Why can't m2e simply call any old plugin I have? What's wrong with this one? How do I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
请参阅http://wiki.eclipse.org/M2E_plugin_execution_not_covered
See http://wiki.eclipse.org/M2E_plugin_execution_not_covered
如果您四处搜索,您会发现很多链接向您展示如何抑制该错误。然而,我找到了一种方法,可以让默认的 Maven Project Builder 在 eclipse 中实际执行这些插件。关键是将您在许多建议中找到的
更改为
。将其添加到我的 pom 后,我只需用户保存 javascript 资源即可自动聚合、压缩和部署:If you search around, you'll find a lot of links showing you how to suppress that error. However, I found a way to actually have the default Maven Project Builder execute these plugins within eclipse. The key is to change the
<ignore>
you find in many suggestions to<execute>
. After adding this to my pom, I have automatic aggregation, compression, and deployment off of just a user saving a javascript resource:也许你必须提供 id 和阶段?
至少我没有通过此配置收到该消息。
Maybe you have to provide the id and phase?
At least i don't get that message with this configuration.