maven webapp-cache.xml的问题 [英] problem with maven webapp-cache.xml

查看:181
本文介绍了maven webapp-cache.xml的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用maven配置的web应用程序。
我在eclipse之外完成了重新分解(将文件从一个包移到另一个包),因为这不是在eclipse上设置的,而且它是小修补。但是,但是我忘了在文件中更新对该文件的引用。
然后我做了 mvn clean install
令人惊讶的是它已经成功构建。后来它在CI机器上失败了。

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.

当我搜索文件的文本出现时,我重新考虑了,我发现这个文件名在 target \war\webapp-cache.xml 文件。
它包含这个重新分解文件的引用(旧路径,新路径)。

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?

更新:我们在这个项目中使用GWT,当我做了 mvn clean install 它删除了目标文件夹,然后开始编译java源代码,
,然后开始编译java到java脚本,做了12个排列之后,我的内部版本受到了攻击。所以,我做了Ctrl + C来停止它,然后我发出了 mvn install (没有清除)。

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).

这似乎是问题所在。

但是在GWT开始编译之前,应该完成java编译并且由于这个错误(指的是不存在的java文件)应该有java编译失败。

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.

推荐答案

Maven war插件文档


cacheFile:包含
webapp结构缓存的文件。

cacheFile: The file containing the webapp structure cache.

* Type: java.io.File
* Since: 2.1-alpha-1
* Required: Yes
* Default: ${project.build.directory}/war/work/webapp-cache.xml


这个文件被war插件用来创建WAR文件。它包含最终构件的结构,因此它将维护文件引用到包含的所有内容。

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.

这篇关于maven webapp-cache.xml的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆