pom.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  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>net.mingsoft</groupId>
  7. <artifactId>ms-pom</artifactId>
  8. <version>1.0.0</version>
  9. <relativePath/>
  10. </parent>
  11. <modelVersion>4.0.0</modelVersion>
  12. <groupId>net.mingsoft</groupId>
  13. <artifactId>ms-mcms</artifactId>
  14. <version>5.0.0</version>
  15. <name>${project.groupId}:${project.artifactId}</name>
  16. <description>ms-mcms tools Library</description>
  17. <url>https://github.com/ming-soft/ms-mcms</url>
  18. <licenses>
  19. <license>
  20. <name>The MIT License (MIT)</name>
  21. <url>http://mit-license.org</url>
  22. </license>
  23. </licenses>
  24. <developers>
  25. <developer>
  26. <name>mingsoft develop group</name>
  27. <email>service@mingsoft.net</email>
  28. <organization>mingsoft</organization>
  29. <organizationUrl>http://www.mingsoft.net</organizationUrl>
  30. </developer>
  31. </developers>
  32. <scm>
  33. <connection>scm:git://github.com/ming-soft/ms-mcms.git</connection>
  34. <developerConnection>scm:git@github.com:ming-soft/ms-mcms.git</developerConnection>
  35. <url>https://github.com/ming-soft/ms-mcms</url>
  36. </scm>
  37. <distributionManagement>
  38. <snapshotRepository>
  39. <id>sonatype-nexus-snapshots</id>
  40. <name>Sonatype Nexus snapshot repository</name>
  41. <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  42. </snapshotRepository>
  43. <repository>
  44. <id>sonatype-nexus-staging</id>
  45. <name>Sonatype Nexus release repository</name>
  46. <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  47. </repository>
  48. </distributionManagement>
  49. <properties>
  50. <java.version>1.8</java.version>
  51. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  52. </properties>
  53. <dependencies>
  54. <!-- 如果使用的是mysql8.0需要使用8.0的驱动 -->
  55. <!-- <dependency>-->
  56. <!-- <groupId>mysql</groupId>-->
  57. <!-- <artifactId>mysql-connector-java</artifactId>-->
  58. <!-- <version>8.0.11</version>-->
  59. <!-- </dependency>-->
  60. <dependency>
  61. <groupId>net.mingsoft</groupId>
  62. <artifactId>ms-mpeople</artifactId>
  63. </dependency>
  64. <dependency>
  65. <groupId>net.mingsoft</groupId>
  66. <artifactId>ms-upgrader</artifactId>
  67. </dependency>
  68. </dependencies>
  69. <build>
  70. <resources>
  71. <resource>
  72. <directory>src/main/java</directory>
  73. </resource>
  74. <resource>
  75. <directory>src/main/webapp</directory>
  76. <excludes>
  77. <exclude>html/</exclude>
  78. <exclude>static/</exclude>
  79. <exclude>upload/</exclude>
  80. <exclude>templets/</exclude>
  81. </excludes>
  82. </resource>
  83. <resource>
  84. <directory>src/main/resources</directory>
  85. </resource>
  86. </resources>
  87. <plugins>
  88. <plugin>
  89. <groupId>org.apache.maven.plugins</groupId>
  90. <artifactId>maven-jar-plugin</artifactId>
  91. <version>2.6</version>
  92. <executions>
  93. <execution>
  94. <phase>package</phase>
  95. <goals>
  96. <goal>jar</goal>
  97. </goals>
  98. </execution>
  99. </executions>
  100. <configuration>
  101. <excludes>
  102. <!--注意这玩意从编译结果目录开始算目录结构 -->
  103. <exclude>**/static/plugins/</exclude>
  104. <exclude>**/static/skin/</exclude>
  105. <exclude>**/application*.yml</exclude>
  106. <exclude>**/Dockerfile</exclude>
  107. <exclude>**/ehcache.xml</exclude>
  108. <exclude>**/upgrade/</exclude>
  109. <exclude>**/*.java</exclude>
  110. </excludes>
  111. </configuration>
  112. </plugin>
  113. <plugin>
  114. <groupId>org.apache.maven.plugins</groupId>
  115. <artifactId>maven-source-plugin</artifactId>
  116. <version>2.2.1</version>
  117. <configuration>
  118. <excludes>
  119. <exclude>**/static/plugins/</exclude>
  120. <exclude>**/static/skin/</exclude>
  121. <exclude>**/application*.yml</exclude>
  122. <exclude>**/Dockerfile</exclude>
  123. <exclude>**/ehcache.xml</exclude>
  124. <exclude>**/upgrade/</exclude>
  125. <exclude>**/config/</exclude>
  126. <exclude>**/MSApplication.java</exclude>
  127. <exclude>**/MSServletInitializer.java</exclude>
  128. </excludes>
  129. </configuration>
  130. <executions>
  131. <execution>
  132. <id>attach-sources</id>
  133. <goals>
  134. <goal>jar-no-fork</goal>
  135. </goals>
  136. </execution>
  137. </executions>
  138. </plugin>
  139. <plugin>
  140. <groupId>org.apache.maven.plugins</groupId>
  141. <artifactId>maven-compiler-plugin</artifactId>
  142. <version>3.1</version>
  143. <configuration>
  144. <source>${java.version}</source>
  145. <target>${java.version}</target>
  146. <encoding>${project.build.sourceEncoding}</encoding>
  147. <showDeprecation>true</showDeprecation>
  148. <showWarnings>true</showWarnings>
  149. <compilerArguments>
  150. <verbose />
  151. <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath>
  152. </compilerArguments>
  153. <compilerArgument>-Xlint:unchecked</compilerArgument>
  154. </configuration>
  155. <dependencies>
  156. <dependency>
  157. <groupId>org.codehaus.plexus</groupId>
  158. <artifactId>plexus-compiler-eclipse</artifactId>
  159. <version>2.1</version>
  160. </dependency>
  161. </dependencies>
  162. </plugin>
  163. <plugin>
  164. <groupId>org.apache.maven.plugins</groupId>
  165. <artifactId>maven-eclipse-plugin</artifactId>
  166. <version>2.8</version>
  167. <configuration>
  168. <additionalConfig>
  169. <file>
  170. <name>.settings/org.eclipse.core.resources.prefs</name>
  171. <content>
  172. <![CDATA[
  173. eclipse.preferences.version=1
  174. encoding/<project>=${project.build.sourceEncoding}
  175. ]]>
  176. </content>
  177. </file>
  178. </additionalConfig>
  179. </configuration>
  180. </plugin>
  181. <plugin>
  182. <artifactId>maven-surefire-plugin</artifactId>
  183. <configuration>
  184. <argLine>-Xmx256m</argLine>
  185. </configuration>
  186. </plugin>
  187. <plugin>
  188. <groupId>com.atlassian.maven.plugins</groupId>
  189. <artifactId>maven-clover2-plugin</artifactId>
  190. <version>2.6.3</version>
  191. <configuration>
  192. <licenseLocation>${clover.license.file}</licenseLocation>
  193. <encoding>${project.build.sourceEncoding}</encoding>
  194. <generateXml>true</generateXml>
  195. </configuration>
  196. </plugin>
  197. <plugin>
  198. <groupId>org.codehaus.mojo</groupId>
  199. <artifactId>findbugs-maven-plugin</artifactId>
  200. <version>1.2</version>
  201. <configuration>
  202. <findbugsXmlOutput>true</findbugsXmlOutput>
  203. <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
  204. <xmlOutput>true</xmlOutput>
  205. </configuration>
  206. </plugin>
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-javadoc-plugin</artifactId>
  210. <version>2.9.1</version>
  211. <configuration>
  212. <charset>UTF-8</charset>
  213. <encoding>UTF-8</encoding>
  214. <docencoding>UTF-8</docencoding>
  215. <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
  216. <additionalparam>-Xdoclint:none</additionalparam>
  217. </configuration>
  218. <executions>
  219. <execution>
  220. <id>attach-javadocs</id>
  221. <goals>
  222. <goal>jar</goal>
  223. </goals>
  224. </execution>
  225. </executions>
  226. </plugin>
  227. <plugin>
  228. <groupId>org.apache.maven.plugins</groupId>
  229. <artifactId>maven-war-plugin</artifactId>
  230. <version>2.6</version>
  231. <configuration>
  232. <webResources>
  233. <resource>
  234. <directory>src/main/webapp/WEB-INF</directory>
  235. <targetPath>WEB-INF</targetPath>
  236. <filtering>true</filtering>
  237. <includes>
  238. <include>**/*.xml</include>
  239. </includes>
  240. <excludes>
  241. <exclude>web.xml</exclude>
  242. </excludes>
  243. </resource>
  244. </webResources>
  245. <attachClasses>true</attachClasses>
  246. <warSourceExcludes> */web.xml,static</warSourceExcludes>
  247. <failOnMissingWebXml>false</failOnMissingWebXml>
  248. <packagingExcludes>ms.install,html/,static/,temp,upgrader,WEB-INF/web.xml,WEB-INF/lib/,templets/,upload/,WEB-INF/classes/*.xml,WEB-INF/classes/*.properties,*.sh,WEB-INF/classes/net/mingsoft/config/,WEB-INF/classes/net/mingsoft/*.class</packagingExcludes>
  249. </configuration>
  250. </plugin>
  251. <plugin>
  252. <groupId>org.apache.maven.plugins</groupId>
  253. <artifactId>maven-release-plugin</artifactId>
  254. <configuration>
  255. <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
  256. </configuration>
  257. </plugin>
  258. <plugin>
  259. <groupId>org.sonatype.plugins</groupId>
  260. <artifactId>nexus-staging-maven-plugin</artifactId>
  261. <version>1.6.7</version>
  262. <extensions>true</extensions>
  263. <configuration>
  264. <serverId>sonatype-nexus-staging</serverId>
  265. <nexusUrl>https://oss.sonatype.org/</nexusUrl>
  266. <autoReleaseAfterClose>true</autoReleaseAfterClose>
  267. </configuration>
  268. </plugin>
  269. <plugin>
  270. <groupId>org.apache.maven.plugins</groupId>
  271. <artifactId>maven-gpg-plugin</artifactId>
  272. <version>1.5</version>
  273. <executions>
  274. <execution>
  275. <id>sign-artifacts</id>
  276. <phase>verify</phase>
  277. <goals>
  278. <goal>sign</goal>
  279. </goals>
  280. </execution>
  281. </executions>
  282. </plugin>
  283. </plugins>
  284. <defaultGoal>compile</defaultGoal>
  285. <finalName>ms-mcms</finalName>
  286. </build>
  287. </project>