pom.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>com.uas.huid</groupId>
  5. <artifactId>huid_attch</artifactId>
  6. <packaging>jar</packaging>
  7. <version>1.0.0</version>
  8. <name>huid attch</name>
  9. <url>http://maven.apache.org</url>
  10. <properties>
  11. <static.prefix.skip>true</static.prefix.skip>
  12. </properties>
  13. <profiles>
  14. <profile>
  15. <id>prod</id>
  16. </profile>
  17. </profiles>
  18. <build>
  19. <finalName>${project.artifactId}</finalName>
  20. <sourceDirectory>src</sourceDirectory>
  21. <resources>
  22. <resource>
  23. <directory>${basedir}/src</directory>
  24. <filtering>true</filtering>
  25. <includes>
  26. <include>**/*.properties</include>
  27. <include>**/*.xml</include>
  28. </includes>
  29. </resource>
  30. </resources>
  31. <!-- 获取svn信息 -->
  32. <plugins>
  33. <plugin>
  34. <groupId>pl.project13.maven</groupId>
  35. <artifactId>git-commit-id-plugin</artifactId>
  36. <version>2.2.5</version>
  37. <executions>
  38. <execution>
  39. <goals>
  40. <goal>revision</goal>
  41. </goals>
  42. </execution>
  43. </executions>
  44. <configuration>
  45. <dateFormat>yyyyMMddHHmmss</dateFormat>
  46. </configuration>
  47. </plugin>
  48. <plugin>
  49. <groupId>org.apache.maven.plugins</groupId>
  50. <artifactId>maven-compiler-plugin</artifactId>
  51. <version>3.5.1</version>
  52. <configuration>
  53. <source>1.7</source>
  54. <target>1.7</target>
  55. <encoding>UTF-8</encoding>
  56. <compilerArgs>
  57. <arg>-Xlint:unchecked</arg>
  58. <arg>-Xlint:deprecation</arg>
  59. <arg>-bootclasspath</arg>
  60. <arg>${env.JAVA_HOME}/jre/lib/rt.jar</arg>
  61. <arg>-extdirs</arg>
  62. <!-- windows下用分号隔开 -->
  63. <arg>${env.JAVA_HOME}/jre/lib:${basedir}/lib</arg>
  64. </compilerArgs>
  65. </configuration>
  66. </plugin>
  67. <plugin>
  68. <artifactId>maven-resources-plugin</artifactId>
  69. <executions>
  70. <execution>
  71. <id>copy-resources</id>
  72. <phase>prepare-package</phase>
  73. <goals>
  74. <goal>copy-resources</goal>
  75. </goals>
  76. <configuration>
  77. <outputDirectory>${project.build.directory}/huid_attch</outputDirectory>
  78. <overwrite>false</overwrite>
  79. <resources>
  80. <resource>
  81. <directory>${project.build.directory}/classes</directory>
  82. </resource>
  83. </resources>
  84. </configuration>
  85. </execution>
  86. </executions>
  87. </plugin>
  88. <!--<plugin>
  89. <groupId>org.apache.maven.plugins</groupId>
  90. <artifactId>maven-jar-plugin</artifactId>
  91. <version>3.1.0</version>
  92. <configuration>
  93. <archive>
  94. <manifest>
  95. <addClasspath>true</addClasspath>
  96. <classpathPrefix>lib/</classpathPrefix>
  97. <mainClass>com.uas.main.Main</mainClass>
  98. </manifest>
  99. </archive>
  100. </configuration>
  101. </plugin>
  102. -->
  103. <plugin>
  104. <groupId>org.apache.maven.plugins</groupId>
  105. <artifactId>maven-war-plugin</artifactId>
  106. <version>2.1.1</version>
  107. <configuration>
  108. <webResources>
  109. <resource>
  110. <directory>${project.build.directory}/huid_attch</directory>
  111. </resource>
  112. </webResources>
  113. </configuration>
  114. </plugin>
  115. </plugins>
  116. </build>
  117. <repositories>
  118. <repository>
  119. <snapshots>
  120. <enabled>false</enabled>
  121. </snapshots>
  122. <id>aliyun</id>
  123. <name>aliyun</name>
  124. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  125. </repository>
  126. <repository>
  127. <snapshots>
  128. <enabled>false</enabled>
  129. </snapshots>
  130. <id>ubtob-release</id>
  131. <name>ubtob-release</name>
  132. <url>http://maven.ubtob.com/artifactory/libs-release-local</url>
  133. </repository>
  134. <repository>
  135. <snapshots>
  136. <enabled>true</enabled>
  137. <updatePolicy>always</updatePolicy>
  138. </snapshots>
  139. <id>ubtob-snapshot</id>
  140. <name>ubtob-snapshot</name>
  141. <url>http://maven.ubtob.com/artifactory/libs-snapshot-local</url>
  142. </repository>
  143. </repositories>
  144. <distributionManagement>
  145. <!-- 发布release仓库 -->
  146. <repository>
  147. <id>platform-release</id>
  148. <name>platform-release</name>
  149. <url>http://10.10.101.21:8081/artifactory/libs-release-local</url>
  150. </repository>
  151. <!-- 发布快照版本 -->
  152. <snapshotRepository>
  153. <id>platform-snapshots</id>
  154. <name>platform-snapshots</name>
  155. <url>http://10.10.101.21:8081/artifactory/libs-snapshot-local</url>
  156. </snapshotRepository>
  157. </distributionManagement>
  158. </project>