一般来说,m2eclipse 如何处理修改或修改生命周期阶段的 Maven 插件?
特别是,我有一个项目有一个 maven-clean-plugin 扩展,可以使用配置文件集标签删除额外生成的目录(不在 target/
中)。这在命令行运行 mvn 时有效,但在 Eclipse 中执行清理时无效。有没有办法让 m2eclipse 处理那个插件?
另一个例子是flexmojos;有很多可以使用 flexmojo 插件配置的参数,但这些参数似乎没有被 m2eclipse 导入。
整合只是临时的吗?如果m2eclipse内嵌了Maven,为什么不能使用底层pom.xml配置直接执行插件?
最佳答案
In general, how well does m2eclipse deal with Maven plugins that modify or amend lifecycle phases?
根据我的经验,不错。至少对于绑定(bind)到 default lifecycle 阶段的插件.
In particular, I have a project that has a maven-clean-plugin extension (...). This works when running mvn at the command line but not when doing a clean in Eclipse. Is there any way to get m2eclipse to process that plugin?
clean 插件“扩展”在做什么以及您在做什么(从 Eclipse 调用 mvn clean
?调用 Project > Clean?)不清楚 - 至少对我来说。但也许看看MNGECLIPSE-823或 MNGECLIPSE-156 .并且不要犹豫澄清:)
Another example is flexmojos; there's a lot that can be configured with the flexmojo plugin but those parameters don't seem to get imported by m2eclipse.
我不做 flex,所以上面的内容对我来说太模糊了。但提供更具体的示例可能会有所帮助。
关于maven-2 - m2eclipse 如何处理 maven 插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3790447/