damp-pom-targz.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <groupId>com.primeton.damp</groupId>
  7. <artifactId>damp-server</artifactId>
  8. <version>7.0.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>boot</artifactId>
  12. <packaging>jar</packaging>
  13. <dependencies>
  14. <dependency>
  15. <groupId>com.primeton.damp</groupId>
  16. <artifactId>core</artifactId>
  17. <version>${damp.version}</version>
  18. <exclusions>
  19. <exclusion>
  20. <artifactId>commons-io</artifactId>
  21. <groupId>commons-io</groupId>
  22. </exclusion>
  23. <exclusion>
  24. <artifactId>springfox-swagger2</artifactId>
  25. <groupId>io.springfox</groupId>
  26. </exclusion>
  27. <exclusion>
  28. <artifactId>springfox-swagger-ui</artifactId>
  29. <groupId>io.springfox</groupId>
  30. </exclusion>
  31. <exclusion>
  32. <artifactId>guava</artifactId>
  33. <groupId>com.google.guava</groupId>
  34. </exclusion>
  35. </exclusions>
  36. </dependency>
  37. <dependency>
  38. <groupId>com.primeton.damp</groupId>
  39. <artifactId>damp</artifactId>
  40. <version>${damp.version}</version>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.mybatis.generator</groupId>
  44. <artifactId>mybatis-generator-core</artifactId>
  45. <version>${mybatis-generator.version}</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>tk.mybatis</groupId>
  49. <artifactId>mapper-generator</artifactId>
  50. <version>1.0.0</version>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.jasig.cas.client</groupId>
  54. <artifactId>cas-client-core</artifactId>
  55. <version>3.5.0</version>
  56. </dependency>
  57. </dependencies>
  58. <build>
  59. <finalName>dampServer-${project.version}</finalName>
  60. <plugins>
  61. <!-- 打包插件 -->
  62. <plugin>
  63. <groupId>org.springframework.boot</groupId>
  64. <artifactId>spring-boot-maven-plugin</artifactId>
  65. <configuration>
  66. <includeSystemScope>true</includeSystemScope>
  67. </configuration>
  68. <executions>
  69. <execution>
  70. <goals>
  71. <goal>repackage</goal>
  72. </goals>
  73. <configuration>
  74. <mainClass>com.primeton.damp.Application</mainClass>
  75. </configuration>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <plugin>
  80. <artifactId>maven-compiler-plugin</artifactId>
  81. <configuration>
  82. <source>${java.version}</source>
  83. <!-- 指定JDK编译版本 -->
  84. <target>${java.version}</target>
  85. </configuration>
  86. </plugin>
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-assembly-plugin</artifactId>
  90. <version>2.4</version>
  91. <configuration>
  92. <descriptors>
  93. <descriptor>${project.basedir}/src/main/assembly/assembly.xml</descriptor>
  94. </descriptors>
  95. <finalName>Primeton_DQMS${project.version}_Server</finalName>
  96. <archive>
  97. <manifest>
  98. <mainClass/>
  99. </manifest>
  100. </archive>
  101. </configuration>
  102. <executions>
  103. <execution>
  104. <id>make-assembly</id>
  105. <goals>
  106. <goal>single</goal>
  107. </goals>
  108. </execution>
  109. </executions>
  110. </plugin>
  111. <plugin>
  112. <groupId>org.apache.maven.plugins</groupId>
  113. <artifactId>maven-antrun-plugin</artifactId>
  114. <version>1.8</version>
  115. <executions>
  116. <execution>
  117. <phase>compile</phase>
  118. <goals>
  119. <goal>run</goal>
  120. </goals>
  121. <configuration>
  122. <exportAntProperties>true</exportAntProperties>
  123. <propertyPrefix>damp</propertyPrefix>
  124. <tasks>
  125. <echo message="rm dist directory" />
  126. <!-- 删除指定目录下的所有文件和目录,包括指定目录-->
  127. <delete includeEmptyDirs="true">
  128. <fileset dir="${project.build.directory}/dist"/>
  129. </delete>
  130. <echo message="mkdir dist directory" />
  131. <mkdir dir="${project.build.directory}/dist"/>
  132. <echo message="copy maven dependencies" />
  133. <exec executable="mvn">
  134. <arg line=" dependency:copy-dependencies "/>
  135. </exec>
  136. <tar longfile="gnu"
  137. destfile="${project.build.directory}/dist/${project.build.finalName}-bin.tar.gz" compression="gzip">
  138. <tarfileset dir="${project.build.directory}/dependency" filemode="755" dirmode="755" prefix="${project.build.finalName}/lib">
  139. <include name="*.jar"/>
  140. </tarfileset>
  141. <tarfileset dir="${project.basedir}/src/main/scripts" filemode="755" dirmode="755" prefix="${project.build.finalName}" >
  142. <include name="*.sh"/>
  143. </tarfileset>
  144. <tarfileset dir="${project.basedir}/src/main/scripts" filemode="755" dirmode="755" prefix="${project.build.finalName}">
  145. <include name="*.bat"/>
  146. </tarfileset>
  147. <tarfileset dir="${project.basedir}/src/main/resources" filemode="755" dirmode="755" prefix="${project.build.finalName}/conf">
  148. </tarfileset>
  149. <tarfileset dir="${project.basedir}/../manual/resourceTemplate" filemode="755" dirmode="755" prefix="${project.build.finalName}/resourceTemplate">
  150. </tarfileset>
  151. <tarfileset dir="${project.basedir}/../manual/dataCheck" filemode="755" dirmode="755" prefix="${project.build.finalName}/dataCheck">
  152. </tarfileset>
  153. </tar>
  154. </tasks>
  155. </configuration>
  156. </execution>
  157. </executions>
  158. </plugin>
  159. </plugins>
  160. </build>
  161. </project>