springboot maven-assembly-plugin使用
官网:Apache Maven Assembly Plugin – Introduction
**********************
maven assembly plugin
The Assembly Plugin for Maven enables developers to combine project output into a single
distributable archive that also contains dependencies, modules, site documentation, and
other files.
# assembly插件可将project output、dependencies、模块、site文档等文件整合为一个文档
支持的文档格式
Currently it can create distributions in the following formats:
zip、tar、jar、dir、war
tar.gz (or tgz)
tar.bz2 (or tbz2)
tar.snappy
tar.xz (or txz)
and any other format that the ArchiveManager has been configured for
assembly descriptor format:描述归档文件的项目结构
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id/> <!-- assembly.xml文件id -->
<formats/> <!-- 生成的文档格式,可为多个,如zip、tar等 -->
<includeBaseDirectory/> <!-- 是否包含baseDirectory,默认为true -->
<baseDirectory/> <!-- 如果没有设置,并且includeBaseDirectory设置为true
baseDirectory默认为:${project.build.finalName} -->
<includeSiteDirectory/> <!-- 是否包含siteDirectory,默认为false -->
<!-- containerDescriptorHandlers设置 -->
<containerDescriptorHandlers>
<containerDescriptorHandler>
<handlerName/>
<configuration/>
</containerDescriptorHandler>
</containerDescriptorHandlers>
<!-- module设置 -->
<moduleSets>
<moduleSet> <!-- A moduleSet represent one or more project <module>
present inside a project's pom.xml -->
<useAllReactorProjects/>
<includeSubModules/>
<includes/>
<excludes/>
<sources> <!-- Contains configuration options for including the source
files of a project module in an assembly -->
<useDefaultExcludes/>
<outputDirectory/>
<includes/>
<excludes/>
<fileMode/>
<directoryMode/>
<fileSets>
<fileSet>
<useDefaultExcludes/>
<outputDirectory/>
<inclu