You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. <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/maven-v4_0_0.xsd">
  2. <modelVersion>4.0.0</modelVersion>
  3. <parent>
  4. <groupId>org.sonarsource.parent</groupId>
  5. <artifactId>parent</artifactId>
  6. <version>71.0.0.1292</version>
  7. </parent>
  8. <groupId>org.sonarsource.scanner.cli</groupId>
  9. <artifactId>sonar-scanner-cli</artifactId>
  10. <version>6.0-SNAPSHOT</version>
  11. <packaging>jar</packaging>
  12. <name>SonarScanner CLI</name>
  13. <url>https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/scanners/sonarscanner/</url>
  14. <inceptionYear>2011</inceptionYear>
  15. <organization>
  16. <name>SonarSource</name>
  17. <url>https://www.sonarsource.com</url>
  18. </organization>
  19. <licenses>
  20. <license>
  21. <name>GNU LGPL 3</name>
  22. <url>https://www.gnu.org/licenses/lgpl.txt</url>
  23. <distribution>repo</distribution>
  24. </license>
  25. </licenses>
  26. <scm>
  27. <connection>scm:git:git@github.com:SonarSource/sonar-scanner-cli.git</connection>
  28. <developerConnection>scm:git:git@github.com:SonarSource/sonar-scanner-cli.git</developerConnection>
  29. <url>https://github.com/SonarSource/sonar-scanner-cli</url>
  30. <tag>HEAD</tag>
  31. </scm>
  32. <issueManagement>
  33. <system>JIRA</system>
  34. <url>https://jira.sonarsource.com/browse/SCANCLI</url>
  35. </issueManagement>
  36. <ciManagement>
  37. <system>cirrus-ci</system>
  38. <url>https://cirrus-ci.com/github/SonarSource/sonar-scanner-cli</url>
  39. </ciManagement>
  40. <properties>
  41. <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
  42. <!-- used for deployment to SonarSource Artifactory -->
  43. <gitRepositoryName>sonar-scanner-cli</gitRepositoryName>
  44. <!-- configuration for assembly of distributions -->
  45. <unpack.dir>${project.build.directory}/unpack</unpack.dir>
  46. <scanner.jar>${project.build.finalName}.jar</scanner.jar>
  47. <jre.dirname.linux>jdk-17.0.11+9-jre</jre.dirname.linux>
  48. <jre.dirname.windows>jdk-17.0.11+9-jre</jre.dirname.windows>
  49. <jre.dirname.macosx>jdk-17.0.11+9-jre/Contents/Home</jre.dirname.macosx>
  50. <!-- Release: enable publication to Bintray -->
  51. <artifactsToPublish>${project.groupId}:${project.artifactId}:zip,${project.groupId}:${project.artifactId}:zip:linux,${project.groupId}:${project.artifactId}:zip:windows,${project.groupId}:${project.artifactId}:zip:macosx,${project.groupId}:${project.artifactId}:json:cyclonedx</artifactsToPublish>
  52. <maven.compiler.release>17</maven.compiler.release>
  53. </properties>
  54. <dependencies>
  55. <dependency>
  56. <groupId>org.sonarsource.scanner.lib</groupId>
  57. <artifactId>sonar-scanner-java-library</artifactId>
  58. <version>3.0.0.141</version>
  59. </dependency>
  60. <dependency>
  61. <groupId>ch.qos.logback</groupId>
  62. <artifactId>logback-classic</artifactId>
  63. <version>1.5.6</version>
  64. </dependency>
  65. <dependency>
  66. <groupId>com.google.code.findbugs</groupId>
  67. <artifactId>jsr305</artifactId>
  68. <version>3.0.2</version>
  69. <scope>provided</scope>
  70. </dependency>
  71. <!-- Unit tests -->
  72. <dependency>
  73. <groupId>org.junit.jupiter</groupId>
  74. <artifactId>junit-jupiter-engine</artifactId>
  75. <version>5.10.1</version>
  76. <scope>test</scope>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.junit.jupiter</groupId>
  80. <artifactId>junit-jupiter-params</artifactId>
  81. <version>5.10.1</version>
  82. <scope>test</scope>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.assertj</groupId>
  86. <artifactId>assertj-core</artifactId>
  87. <version>3.24.2</version>
  88. <scope>test</scope>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.mockito</groupId>
  92. <artifactId>mockito-core</artifactId>
  93. <version>5.10.0</version>
  94. <scope>test</scope>
  95. </dependency>
  96. </dependencies>
  97. <build>
  98. <resources>
  99. <resource>
  100. <directory>src/main/resources</directory>
  101. <filtering>true</filtering>
  102. </resource>
  103. </resources>
  104. <pluginManagement>
  105. <plugins>
  106. <plugin>
  107. <groupId>com.googlecode.maven-download-plugin</groupId>
  108. <artifactId>download-maven-plugin</artifactId>
  109. <version>1.9.0</version>
  110. </plugin>
  111. </plugins>
  112. </pluginManagement>
  113. <plugins>
  114. <plugin>
  115. <groupId>org.apache.maven.plugins</groupId>
  116. <artifactId>maven-jar-plugin</artifactId>
  117. <configuration>
  118. <archive>
  119. <manifest>
  120. <addClasspath>false</addClasspath>
  121. <mainClass>org.sonarsource.scanner.cli.Main</mainClass>
  122. </manifest>
  123. </archive>
  124. </configuration>
  125. </plugin>
  126. <plugin>
  127. <groupId>org.apache.maven.plugins</groupId>
  128. <artifactId>maven-shade-plugin</artifactId>
  129. <version>3.5.1</version>
  130. <executions>
  131. <execution>
  132. <phase>package</phase>
  133. <goals>
  134. <goal>shade</goal>
  135. </goals>
  136. <configuration>
  137. <createDependencyReducedPom>true</createDependencyReducedPom>
  138. <minimizeJar>true</minimizeJar>
  139. <filters>
  140. <filter>
  141. <artifact>*:*</artifact>
  142. <excludes>
  143. <exclude>META-INF/*.SF</exclude>
  144. <exclude>META-INF/*.DSA</exclude>
  145. <exclude>META-INF/*.RSA</exclude>
  146. <exclude>META-INF/LICENSE.txt</exclude>
  147. <exclude>META-INF/NOTICE.txt</exclude>
  148. <exclude>META-INF/MANIFEST.MF</exclude>
  149. <exclude>**/module-info.class</exclude>
  150. </excludes>
  151. </filter>
  152. <filter>
  153. <artifact>ch.qos.logback:logback-classic</artifact>
  154. <includes>
  155. <include>**</include>
  156. </includes>
  157. </filter>
  158. </filters>
  159. </configuration>
  160. </execution>
  161. </executions>
  162. </plugin>
  163. <plugin>
  164. <groupId>org.apache.maven.plugins</groupId>
  165. <artifactId>maven-assembly-plugin</artifactId>
  166. <executions>
  167. <execution>
  168. <id>cli</id>
  169. <phase>package</phase>
  170. <goals>
  171. <goal>single</goal>
  172. </goals>
  173. <configuration>
  174. <finalName>sonar-scanner-${project.version}</finalName>
  175. <appendAssemblyId>false</appendAssemblyId>
  176. <escapeString>\</escapeString>
  177. <descriptors>
  178. <descriptor>src/main/assembly/noarch.xml</descriptor>
  179. </descriptors>
  180. <filters>
  181. <filter>src/main/assembly/filter-noarch.properties</filter>
  182. </filters>
  183. </configuration>
  184. </execution>
  185. </executions>
  186. </plugin>
  187. <plugin>
  188. <groupId>org.apache.maven.plugins</groupId>
  189. <artifactId>maven-enforcer-plugin</artifactId>
  190. <executions>
  191. <execution>
  192. <id>enforce-distribution-size</id>
  193. <goals>
  194. <goal>enforce</goal>
  195. </goals>
  196. <phase>verify</phase>
  197. <configuration>
  198. <rules>
  199. <requireFilesSize>
  200. <minsize>4300000</minsize>
  201. <maxsize>4400000</maxsize>
  202. <files>
  203. <file>${project.build.directory}/sonar-scanner-${project.version}.zip</file>
  204. </files>
  205. </requireFilesSize>
  206. </rules>
  207. </configuration>
  208. </execution>
  209. </executions>
  210. </plugin>
  211. <plugin>
  212. <groupId>org.apache.maven.plugins</groupId>
  213. <artifactId>maven-javadoc-plugin</artifactId>
  214. <configuration>
  215. <source>17</source>
  216. </configuration>
  217. </plugin>
  218. <plugin>
  219. <groupId>org.cyclonedx</groupId>
  220. <artifactId>cyclonedx-maven-plugin</artifactId>
  221. <executions>
  222. <execution>
  223. <phase>package</phase>
  224. <goals>
  225. <goal>makeAggregateBom</goal>
  226. </goals>
  227. </execution>
  228. </executions>
  229. </plugin>
  230. </plugins>
  231. </build>
  232. <profiles>
  233. <profile>
  234. <id>dist-linux</id>
  235. <build>
  236. <plugins>
  237. <plugin>
  238. <groupId>com.googlecode.maven-download-plugin</groupId>
  239. <artifactId>download-maven-plugin</artifactId>
  240. <executions>
  241. <execution>
  242. <id>unpack-linux</id>
  243. <phase>package</phase>
  244. <goals>
  245. <goal>wget</goal>
  246. </goals>
  247. <configuration>
  248. <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz</url>
  249. <unpack>true</unpack>
  250. <outputDirectory>${unpack.dir}/linux</outputDirectory>
  251. <sha256>bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707</sha256>
  252. </configuration>
  253. </execution>
  254. </executions>
  255. </plugin>
  256. <plugin>
  257. <artifactId>maven-assembly-plugin</artifactId>
  258. <executions>
  259. <execution>
  260. <id>assemble-linux</id>
  261. <phase>package</phase>
  262. <goals>
  263. <goal>single</goal>
  264. </goals>
  265. <configuration>
  266. <finalName>sonar-scanner-${project.version}</finalName>
  267. <escapeString>\</escapeString>
  268. <descriptors>
  269. <descriptor>src/main/assembly/dist-linux.xml</descriptor>
  270. </descriptors>
  271. <filters>
  272. <filter>src/main/assembly/filter-dist.properties</filter>
  273. </filters>
  274. </configuration>
  275. </execution>
  276. </executions>
  277. </plugin>
  278. </plugins>
  279. </build>
  280. </profile>
  281. <profile>
  282. <id>dist-windows</id>
  283. <build>
  284. <plugins>
  285. <plugin>
  286. <groupId>com.googlecode.maven-download-plugin</groupId>
  287. <artifactId>download-maven-plugin</artifactId>
  288. <executions>
  289. <execution>
  290. <id>unpack-windows</id>
  291. <phase>package</phase>
  292. <goals>
  293. <goal>wget</goal>
  294. </goals>
  295. <configuration>
  296. <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_windows_hotspot_17.0.11_9.zip</url>
  297. <unpack>true</unpack>
  298. <outputDirectory>${unpack.dir}/windows</outputDirectory>
  299. <sha256>4bafe2e94439c8193fc8c68247cb0dbaf4e80265b903288f63f128304f129bbe</sha256>
  300. </configuration>
  301. </execution>
  302. </executions>
  303. </plugin>
  304. <plugin>
  305. <artifactId>maven-assembly-plugin</artifactId>
  306. <executions>
  307. <execution>
  308. <id>assemble-windows</id>
  309. <phase>package</phase>
  310. <goals>
  311. <goal>single</goal>
  312. </goals>
  313. <configuration>
  314. <finalName>sonar-scanner-${project.version}</finalName>
  315. <escapeString>\</escapeString>
  316. <descriptors>
  317. <descriptor>src/main/assembly/dist-windows.xml</descriptor>
  318. </descriptors>
  319. <filters>
  320. <filter>src/main/assembly/filter-dist.properties</filter>
  321. </filters>
  322. </configuration>
  323. </execution>
  324. </executions>
  325. </plugin>
  326. </plugins>
  327. </build>
  328. </profile>
  329. <profile>
  330. <id>dist-macosx</id>
  331. <build>
  332. <plugins>
  333. <plugin>
  334. <groupId>com.googlecode.maven-download-plugin</groupId>
  335. <artifactId>download-maven-plugin</artifactId>
  336. <executions>
  337. <execution>
  338. <id>unpack-macosx</id>
  339. <phase>package</phase>
  340. <goals>
  341. <goal>wget</goal>
  342. </goals>
  343. <configuration>
  344. <url>https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jre_x64_mac_hotspot_17.0.11_9.tar.gz</url>
  345. <unpack>true</unpack>
  346. <outputDirectory>${unpack.dir}/macosx</outputDirectory>
  347. <sha256>232c40bebd6ddbb673862e86e7e6e09bcfe399e5a53c8a6b77bf1ceab8edefd0</sha256>
  348. </configuration>
  349. </execution>
  350. </executions>
  351. </plugin>
  352. <plugin>
  353. <artifactId>maven-assembly-plugin</artifactId>
  354. <executions>
  355. <execution>
  356. <id>assemble-macosx</id>
  357. <phase>package</phase>
  358. <goals>
  359. <goal>single</goal>
  360. </goals>
  361. <configuration>
  362. <finalName>sonar-scanner-${project.version}</finalName>
  363. <escapeString>\</escapeString>
  364. <descriptors>
  365. <descriptor>src/main/assembly/dist-macosx.xml</descriptor>
  366. </descriptors>
  367. <filters>
  368. <filter>src/main/assembly/filter-dist.properties</filter>
  369. </filters>
  370. </configuration>
  371. </execution>
  372. </executions>
  373. </plugin>
  374. </plugins>
  375. </build>
  376. </profile>
  377. </profiles>
  378. </project>