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

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