pom.xml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <groupId>org.sonatype.oss</groupId>
  6. <artifactId>oss-parent</artifactId>
  7. <version>9</version>
  8. </parent>
  9. <groupId>com.alibaba.p3c</groupId>
  10. <artifactId>p3c-pmd</artifactId>
  11. <version>2.0.1</version>
  12. <packaging>jar</packaging>
  13. <name>p3c-pmd</name>
  14. <properties>
  15. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  16. <pmd.version>6.15.0</pmd.version>
  17. <maven.compiler.target>1.8</maven.compiler.target>
  18. <annotation.version>1.3.2</annotation.version>
  19. <kotlin.version>1.3.50</kotlin.version>
  20. </properties>
  21. <description>Alibaba Java Coding Guidelines PMD implementations</description>
  22. <url>https://github.com/alibaba/p3c</url>
  23. <inceptionYear>2017</inceptionYear>
  24. <licenses>
  25. <license>
  26. <name>Apache 2</name>
  27. <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  28. <distribution>repo</distribution>
  29. <comments>A business-friendly OSS license</comments>
  30. </license>
  31. </licenses>
  32. <scm>
  33. <url>https://github.com/alibaba/p3c</url>
  34. <connection>scm:git:https://git@github.com/alibaba/p3c.git</connection>
  35. </scm>
  36. <organization>
  37. <name>Alibaba Group</name>
  38. <url>https://github.com/alibaba</url>
  39. </organization>
  40. <developers>
  41. <developer>
  42. <name>XuanTan</name>
  43. <url>https://github.com/xuantan</url>
  44. <email>zhangym124@gmail.com</email>
  45. </developer>
  46. <developer>
  47. <name>ChangLe</name>
  48. <url>https://github.com/LQZYC</url>
  49. <email>lqleo323@gmail.com</email>
  50. </developer>
  51. <developer>
  52. <name>ZengHou</name>
  53. <url>https://github.com/fw8899</url>
  54. <email>fengwei1983@gmail.com</email>
  55. </developer>
  56. <developer>
  57. <name>ShengYan</name>
  58. <url>http://smiler158.github.io/</url>
  59. <email>smiler158@163.com</email>
  60. </developer>
  61. <developer>
  62. <name>KeQi</name>
  63. <email>lyzw2009@gmail.com</email>
  64. </developer>
  65. <developer>
  66. <name>JunLie</name>
  67. <url>https://github.com/SeanCai</url>
  68. <email>sean.caikang@gmail.com</email>
  69. </developer>
  70. <developer>
  71. <name>MoYan</name>
  72. <url>https://github.com/imu2008</url>
  73. <email>panhuawenmail@gmail.com</email>
  74. </developer>
  75. </developers>
  76. <dependencies>
  77. <dependency>
  78. <groupId>net.sourceforge.pmd</groupId>
  79. <artifactId>pmd-java</artifactId>
  80. <version>${pmd.version}</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>net.sourceforge.pmd</groupId>
  84. <artifactId>pmd-vm</artifactId>
  85. <version>${pmd.version}</version>
  86. </dependency>
  87. <dependency>
  88. <groupId>net.sourceforge.pmd</groupId>
  89. <artifactId>pmd-test</artifactId>
  90. <version>${pmd.version}</version>
  91. <scope>test</scope>
  92. </dependency>
  93. <dependency>
  94. <groupId>javax.annotation</groupId>
  95. <artifactId>javax.annotation-api</artifactId>
  96. <version>${annotation.version}</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.jetbrains.kotlin</groupId>
  100. <artifactId>kotlin-stdlib-jdk8</artifactId>
  101. <version>${kotlin.version}</version>
  102. </dependency>
  103. </dependencies>
  104. <build>
  105. <plugins>
  106. <plugin>
  107. <groupId>org.apache.maven.plugins</groupId>
  108. <artifactId>maven-pmd-plugin</artifactId>
  109. <version>3.11.0</version>
  110. <configuration>
  111. <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
  112. <targetJdk>${maven.compiler.target}</targetJdk>
  113. <printFailingErrors>true</printFailingErrors>
  114. <rulesets>
  115. <ruleset>rulesets/java/ali-comment.xml</ruleset>
  116. <ruleset>rulesets/java/ali-concurrent.xml</ruleset>
  117. <ruleset>rulesets/java/ali-constant.xml</ruleset>
  118. <ruleset>rulesets/java/ali-exception.xml</ruleset>
  119. <ruleset>rulesets/java/ali-flowcontrol.xml</ruleset>
  120. <ruleset>rulesets/java/ali-naming.xml</ruleset>
  121. <ruleset>rulesets/java/ali-oop.xml</ruleset>
  122. <ruleset>rulesets/java/ali-orm.xml</ruleset>
  123. <ruleset>rulesets/java/ali-other.xml</ruleset>
  124. <ruleset>rulesets/java/ali-set.xml</ruleset>
  125. </rulesets>
  126. <excludes>
  127. <exclude>**/FixClassTypeResolver.java</exclude>
  128. </excludes>
  129. </configuration>
  130. <executions>
  131. <execution>
  132. <phase>verify</phase>
  133. <goals>
  134. <goal>check</goal>
  135. </goals>
  136. </execution>
  137. </executions>
  138. <dependencies>
  139. <dependency>
  140. <groupId>com.alibaba.p3c</groupId>
  141. <artifactId>p3c-pmd</artifactId>
  142. <version>2.0.1</version>
  143. </dependency>
  144. </dependencies>
  145. </plugin>
  146. <plugin>
  147. <artifactId>kotlin-maven-plugin</artifactId>
  148. <groupId>org.jetbrains.kotlin</groupId>
  149. <version>${kotlin.version}</version>
  150. <executions>
  151. <execution>
  152. <id>compile</id>
  153. <goals>
  154. <goal>compile</goal>
  155. </goals>
  156. <configuration>
  157. <sourceDirs>
  158. <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
  159. <sourceDir>${project.basedir}/src/main/java</sourceDir>
  160. </sourceDirs>
  161. </configuration>
  162. </execution>
  163. <execution>
  164. <id>test-compile</id>
  165. <goals>
  166. <goal>test-compile</goal>
  167. </goals>
  168. <configuration>
  169. <sourceDirs>
  170. <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
  171. <sourceDir>${project.basedir}/src/test/java</sourceDir>
  172. </sourceDirs>
  173. </configuration>
  174. </execution>
  175. </executions>
  176. </plugin>
  177. <plugin>
  178. <groupId>org.apache.maven.plugins</groupId>
  179. <artifactId>maven-compiler-plugin</artifactId>
  180. <version>3.8.0</version>
  181. <configuration>
  182. <source>${maven.compiler.target}</source>
  183. <target>${maven.compiler.target}</target>
  184. <encoding>UTF-8</encoding>
  185. </configuration>
  186. <executions>
  187. <!-- Replacing default-compile as it is treated specially by maven -->
  188. <execution>
  189. <id>default-compile</id>
  190. <phase>none</phase>
  191. </execution>
  192. <!-- Replacing default-testCompile as it is treated specially by maven -->
  193. <execution>
  194. <id>default-testCompile</id>
  195. <phase>none</phase>
  196. </execution>
  197. <execution>
  198. <id>java-compile</id>
  199. <phase>compile</phase>
  200. <goals>
  201. <goal>compile</goal>
  202. </goals>
  203. </execution>
  204. <execution>
  205. <id>java-test-compile</id>
  206. <phase>test-compile</phase>
  207. <goals>
  208. <goal>testCompile</goal>
  209. </goals>
  210. </execution>
  211. </executions>
  212. </plugin>
  213. <plugin>
  214. <artifactId>maven-assembly-plugin</artifactId>
  215. <version>3.0.0</version>
  216. <configuration>
  217. <descriptorRefs>
  218. <descriptorRef>jar-with-dependencies</descriptorRef>
  219. </descriptorRefs>
  220. </configuration>
  221. <executions>
  222. <execution>
  223. <id>make-assembly</id>
  224. <phase>package</phase>
  225. <goals>
  226. <goal>single</goal>
  227. </goals>
  228. </execution>
  229. </executions>
  230. </plugin>
  231. <plugin>
  232. <groupId>org.apache.maven.plugins</groupId>
  233. <artifactId>maven-javadoc-plugin</artifactId>
  234. <version>2.10.4</version>
  235. <executions>
  236. <execution>
  237. <id>attach-javadocs</id>
  238. <goals>
  239. <goal>jar</goal>
  240. </goals>
  241. </execution>
  242. </executions>
  243. <configuration>
  244. <tags>
  245. <tag>
  246. <name>date</name>
  247. </tag>
  248. </tags>
  249. </configuration>
  250. </plugin>
  251. <!-- <plugin>
  252. <groupId>org.apache.maven.plugins</groupId>
  253. <artifactId>maven-gpg-plugin</artifactId>
  254. <version>1.6</version>
  255. <executions>
  256. <execution>
  257. <id>sign-artifacts</id>
  258. <phase>verify</phase>
  259. <goals>
  260. <goal>sign</goal>
  261. </goals>
  262. </execution>
  263. </executions>
  264. </plugin>-->
  265. </plugins>
  266. </build>
  267. </project>