如何创建文件,并把它与Maven战争吗? [英] How create file and put it in a war with Maven?
问题描述
如何创建文件,并把它与Maven战争建立在战争的时候?
How I can create file and put it in a war with Maven when building the war?
推荐答案
的Maven通过执行Maven的战争插件的战争目标,建立一个战争。看一看这一目标的配置参数在的http:// maven.apache.org/plugins/maven-war-plugin/war-mojo.html 。
Maven builds a war by executing the war goal of the maven-war plugin. Have a look at the configuration parameters of this goal at http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html.
基本上,warSourceDirectory(默认为$ {} BASEDIR /钢骨混凝土/主/ web应用程序),包含去战争,除了你的java code和资源文件。微调与packagingIncludes / packagingExcludes。要包括的其他的模块,利用覆盖文件(S):的 http://maven.apache.org/plugins/maven-war-plugin/overlays.html 。
Basically, warSourceDirectory (defaulting to ${basedir}/src/main/webapp) contains the files that go to the war, apart from your java code and resources. Fine tune with packagingIncludes/packagingExcludes. To include file(s) from another module, use overlay: http://maven.apache.org/plugins/maven-war-plugin/overlays.html.
这篇关于如何创建文件,并把它与Maven战争吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!