Eclipse 和 Maven:文件更改后运行目标
我在 pom 中配置了一个 Maven 目标,该目标在编译阶段执行。 但我也需要在更改特定文件后运行该目标,以保持所有内容始终最新。
即我想保存文件“objects.xml”并运行目标“transform”以在每次完成更改时应用 XSL。
有没有办法从 Eclipse 内部做到这一点?
我一直在阅读有关该项目的自定义构建器的信息,但这并不涵盖我的情况。
I have a maven goal configured in the pom that is executed on compile phase.
But also I need that goal to run after a specific file is changed to keep everything always up to date.
i.e I want to save the file "objects.xml" and run the goal "transform" to apply XSL every time a change is done.
Is there a way for doing that from inside Eclipse?
I've been reading about custom builders for the project, but that does not cover my case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将构建器和自定义 Ant 脚本添加到 Eclipse 工作区。
Project->Preferences->Builders
这些构建器可以自动添加到您的项目中,
通过将以下配置添加到您的 pom 中,
了解更多信息,请参阅 maven-eclipse-plugin 网站
http://maven.apache.org/plugins/maven-eclipse-plugin/
You can add builders and custom ant scripts to your eclipse workspace.
Project->Preferences->Builders
These builders can be automatically be added to you project with
By adding the folling config to your pom
for more info how to do this see the maven-eclipse-plugin website
http://maven.apache.org/plugins/maven-eclipse-plugin/