maven webapp-cache.xml 的问题
我们有一个使用 Maven 配置的 Web 应用程序。 我已经在 Eclipse 之外进行了重构(将文件从一个包移动到另一个包),因为这不是在 Eclipse 上设置的,而且是一个小修复。但是,我确实忘记更新文件中对此文件的引用。 然后我做了mvn clean install
令人惊讶的是它构建成功了。后来在CI机器上失败了。
当我搜索重构的文件的文本出现时,我在 target\war\webapp-cache.xml
文件中找到了此文件名的出现。 它包含此重构文件的两个引用(旧路径,新路径)。
这个文件是什么? 还有其他人遇到过这个问题吗?
更新:我们在这个项目中确实使用了GWT,当我执行mvn clean install
时,它删除了目标文件夹,然后开始编译java源代码, 然后它开始将 java 编译成 java 脚本,在进行 12 次排列之后,我的构建受到了影响。因此,我使用 Ctrl+C 来停止它,然后发出 mvn install
(没有 clean)。
这似乎是问题所在。
但在 GWT 开始编译之前,java 编译应该完成,因为这个错误(指的是不存在的 java 文件)应该导致 java 编译失败。
We have a web application configured with maven.
I have done a re-factoring (moved a file from one package to another) outside of eclipse, since this is not setup on eclipse and it is small fix. But, however I did forget to update reference to this file in a file.
Then I did mvn clean install
surprisingly it is built successfully. Later it got failed on CI machine.
When I searched for text occurrences of the file I have re-factored, I have found an occurrence of this file name in target\war\webapp-cache.xml
file.
It contain both references (old path, new path) of this re-factored file in it.
What is this file?
And did anybody else faced this problem?
UPDATE: We do use GWT in this project and when I did mvn clean install
it deleted the target folder and then started compiling java sources,
then it started with compiling java into java script, after doing 12 permutations my build got struck. So, I did Ctrl+C to stop it and then I issued mvn install
(without clean).
This seems to be the problem.
But before GWT starts with its compilation, java compilation should be completed and since this error (referring to non-existent java file) should have failed java compilation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自 Maven war 插件文档
war 插件使用此文件来创建 WAR 文件。它包含最终工件的结构,因此它将维护对所包含的所有内容的文件引用。
From the Maven war plugin documentation
This file is used by the war plugin to create the WAR file. It contains the structure of your final artifact so it will maintain the file references to everything that's included.