maven .assembly

配置文件中 配置好Assemblyc插件.

功能:打依赖jar包.

java代码如下:

  1. <assembly
  2. xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  5. <id>release</id>
  6. <formats>
  7. <format>zip</format>
  8. </formats>
  9. <fileSets>
  10. <fileSet>
  11. <directory>${project.basedir}\src\main\config</directory>
  12. <!-- 过滤 -->
  13. <excludes>
  14. <exclude>*.xml</exclude>
  15. </excludes>
  16. <outputDirectory>\</outputDirectory>
  17. </fileSet>
  18. </fileSets>
  19. <dependencySets>
  20. <dependencySet>
  21. <useProjectArtifact>true</useProjectArtifact>
  22. <outputDirectory>lib</outputDirectory><!-- 将scope为runtime的依赖包打包到lib目录下。 -->
  23. <scope>runtime</scope>
  24. </dependencySet>
  25. </dependencySets>
  26. </assembly>
上一篇:git 用法


下一篇:jenkins结合svn检测版本变化执行shell脚本实现项目部署