m2eclipse资源过滤
我在 Eclipse 中使用 m2eclipse Maven 支持进行资源过滤时遇到问题。似乎过滤仅发生在已更改的资源上。这从根本上是有缺陷的,因为如果我有一个引用属性的文件(例如 ${my.property}),如果属性的值发生更改,则仅当引用文件也被修改时才会执行过滤 - 如果我只更改属性值(在我的 pom.xml 中),过滤不会应用于引用它的文件,
因此,如果我对 pom 文件中的属性进行更改,则不会应用过滤但是,如果我继续。到引用该属性的文件(例如 Spring 配置文件),然后编辑并保存它,
我确实在某处读到:
“如果增量构建期间没有资源更改,则 m2eclipse 会跳过过滤”
我正在使用 m2eclipse。 0.10.x
还有其他人遇到过这个吗?
谢谢,
安德鲁
I've having problems with resource filtering using m2eclipse Maven support in Eclipse. It seems that filtering only takes place on resources that have changed. This is fundamentally flawed because, if I have a file that references properties (e.g. ${my.property}, if the value of the property changes, the filtering will only be performed if the referencing file is also modified - if I only change the property value (in my pom.xml), the filtering is not applied to the files that that reference it.
So, if I make a change to a property in my pom file, the filtering is not applied. However, if I then go to the file that references that property (e.g. a Spring config file) then edit and save it, the filtering is applied.
I did read somewhere that:
"m2eclipse skips filtering if there were no resource changes during incremental build"
I'm using m2eclipse 0.10.x
Has anyone else come across this?
Thanks,
Andrew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,在这个冗长的讨论中提到了这一点(主题不完全是关于资源过滤,但当前的行为是提及):
我的理解是,这是一种设计选择(请参阅 来自尤金的最后一条消息):
因此,在 POM 更改后,您应该更新项目配置: 右键单击您的项目,然后Maven >更新项目配置(这将触发
流程资源
)。据我所知,这仍然是目前的状况。不过,关于 资源过滤 有很多问题,也许可以检查一下如果你能找到类似的。
Yes, this is mentioned in this lengthy discussion (the topic is not exactly about resources filtering but the current behavior is mentioned):
And my understanding is that this was a design choice (see the last message from Eugene):
So, after a change in your POM, you should update the project configuration: right-click on your project then Maven > Update Project Configuration (and this will trigger
process-resources
).To my knowledge, this is still the current status. There are many issues about resource filtering though, maybe check to see if you can find an similar one.
是的你是对的。
您应该在 m2eclipse 的错误跟踪器中提出问题。
Yes, you are right.
You should open an issue in m2eclipse's bug tracker.