|
|
|
@ -0,0 +1,60 @@
|
|
|
|
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
|
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
|
|
|
|
|
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
|
|
|
|
<!-- =====================================================================
|
|
|
|
|
${project.artifactId}-assembly-${project.version}
|
|
|
|
|
* 将 env/${env}/conf 下的文件输出到 WEB-INF/classes/conf, 实现 -P${env} 不同的参数打包出不同的配置
|
|
|
|
|
${env} 的值由 -P 的参数传递进来, 如:-PTEST, 那么, ${env} 的值就是 TEST
|
|
|
|
|
=====================================================================-->
|
|
|
|
|
<id>${env}</id>
|
|
|
|
|
|
|
|
|
|
<!-- =====================================================================
|
|
|
|
|
* 默认为 TRUE, 设为 FALSE, 防止将 ${project.finalName} 作为根目录打进 WAR 包
|
|
|
|
|
TRUE 结构: ${project.finalName}.war/${project.finalName}/WEB-INF
|
|
|
|
|
FALSE 结构: ${project.finalName}.war/WEB-INF
|
|
|
|
|
===================================================================== -->
|
|
|
|
|
<includeBaseDirectory>false</includeBaseDirectory>
|
|
|
|
|
|
|
|
|
|
<!-- 设置为 WAR 包格式 -->
|
|
|
|
|
<formats>
|
|
|
|
|
<format>jar</format>
|
|
|
|
|
</formats>
|
|
|
|
|
|
|
|
|
|
<fileSets>
|
|
|
|
|
<!-- =================================================
|
|
|
|
|
target/classes 下的文件输出到 WEB-INF/classes
|
|
|
|
|
================================================= -->
|
|
|
|
|
<fileSet>
|
|
|
|
|
<directory>${project.build.outputDirectory}</directory>
|
|
|
|
|
<outputDirectory>BOOT-INF/classes</outputDirectory>
|
|
|
|
|
<!-- =================================================
|
|
|
|
|
target/classes/conf/*.properties 排除
|
|
|
|
|
================================================= -->
|
|
|
|
|
<excludes>
|
|
|
|
|
<exclude>conf/**</exclude>
|
|
|
|
|
<exclude>code-generator/**</exclude>
|
|
|
|
|
</excludes>
|
|
|
|
|
</fileSet>
|
|
|
|
|
<fileSet>
|
|
|
|
|
<directory>${project.build.outputDirectory}/conf/${env}</directory>
|
|
|
|
|
<outputDirectory>BOOT-INF/classes/</outputDirectory>
|
|
|
|
|
</fileSet>
|
|
|
|
|
<!-- 将 webapp 下的文件输出到 WAR 包
|
|
|
|
|
<fileSet>
|
|
|
|
|
<directory>${project.basedir}/src/main/webapp</directory>
|
|
|
|
|
<outputDirectory>/</outputDirectory>
|
|
|
|
|
</fileSet>
|
|
|
|
|
-->
|
|
|
|
|
</fileSets>
|
|
|
|
|
<!-- 将项目依赖的JAR包输出到 WEB-INF/lib -->
|
|
|
|
|
<dependencySets>
|
|
|
|
|
<dependencySet>
|
|
|
|
|
<!-- ==========================================================================
|
|
|
|
|
true是默认值,本次构建出来的jar包属于当前这个dependencySet,一起打进最终的jar包
|
|
|
|
|
========================================================================== -->
|
|
|
|
|
<useProjectArtifact>false</useProjectArtifact>
|
|
|
|
|
<outputDirectory>BOOT-INF/lib</outputDirectory>
|
|
|
|
|
</dependencySet>
|
|
|
|
|
</dependencySets>
|
|
|
|
|
</assembly>
|