配置文件中 配置好Assemblyc插件.
功能:打依赖jar包.
java代码如下:
- <assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>release</id>
- <formats>
- <format>zip</format>
- </formats>
- <fileSets>
- <fileSet>
- <directory>${project.basedir}\src\main\config</directory>
- <!-- 过滤 -->
- <excludes>
- <exclude>*.xml</exclude>
- </excludes>
- <outputDirectory>\</outputDirectory>
- </fileSet>
- </fileSets>
- <dependencySets>
- <dependencySet>
- <useProjectArtifact>true</useProjectArtifact>
- <outputDirectory>lib</outputDirectory><!-- 将scope为runtime的依赖包打包到lib目录下。 -->
- <scope>runtime</scope>
- </dependencySet>
- </dependencySets>
- </assembly>