problem with maven webapp-cache.xml

♀尐吖头ヾ 提交于 2019-12-12 15:56:27

问题


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.


回答1:


From the Maven war plugin documentation

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

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.



来源:https://stackoverflow.com/questions/4216755/problem-with-maven-webapp-cache-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!