snakeyaml-1.33.pom 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  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/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>org.yaml</groupId>
  5. <artifactId>snakeyaml</artifactId>
  6. <version>1.33</version>
  7. <packaging>bundle</packaging>
  8. <properties>
  9. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  10. <project.scm.id>bitbucket</project.scm.id>
  11. <release.repo.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</release.repo.url>
  12. <snapshot.repo.url>https://oss.sonatype.org/content/repositories/snapshots/</snapshot.repo.url>
  13. <maven.compiler.source>7</maven.compiler.source>
  14. <maven.compiler.target>7</maven.compiler.target>
  15. <maven.compiler.testSource>8</maven.compiler.testSource>
  16. <maven.compiler.testTarget>8</maven.compiler.testTarget>
  17. <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
  18. <maven-bundle-plugin.version>5.1.8</maven-bundle-plugin.version>
  19. <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version><!-- for Github CI -->
  20. <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
  21. <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
  22. <maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
  23. <jdk9-illegal-access-level>deny</jdk9-illegal-access-level>
  24. </properties>
  25. <name>SnakeYAML</name>
  26. <description>YAML 1.1 parser and emitter for Java</description>
  27. <inceptionYear>2008</inceptionYear>
  28. <url>https://bitbucket.org/snakeyaml/snakeyaml</url>
  29. <issueManagement>
  30. <system>Bitbucket</system>
  31. <url>https://bitbucket.org/snakeyaml/snakeyaml/issues</url>
  32. </issueManagement>
  33. <mailingLists>
  34. <mailingList>
  35. <name>SnakeYAML developers and users List</name>
  36. <post>snakeyaml-core@googlegroups.com</post>
  37. </mailingList>
  38. </mailingLists>
  39. <scm>
  40. <connection>scm:git:http://bitbucket.org/snakeyaml/snakeyaml</connection>
  41. <developerConnection>scm:git:ssh://git@bitbucket.org/snakeyaml/snakeyaml</developerConnection>
  42. <url>https://bitbucket.org/snakeyaml/snakeyaml/src</url>
  43. <tag>snakeyaml-1.33</tag>
  44. </scm>
  45. <licenses>
  46. <license>
  47. <name>Apache License, Version 2.0</name>
  48. <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  49. <distribution>repo</distribution>
  50. </license>
  51. </licenses>
  52. <developers>
  53. <developer>
  54. <id>asomov</id>
  55. <name>Andrey Somov</name>
  56. <email>public.somov@gmail.com</email>
  57. </developer>
  58. <developer>
  59. <id>maslovalex</id>
  60. <name>Alexander Maslov</name>
  61. <email>alexander.maslov@gmail.com</email>
  62. </developer>
  63. </developers>
  64. <dependencies>
  65. <dependency>
  66. <groupId>junit</groupId>
  67. <artifactId>junit</artifactId>
  68. <version>4.13.2</version>
  69. <scope>test</scope>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.apache.velocity</groupId>
  73. <artifactId>velocity-engine-core</artifactId>
  74. <version>2.3</version>
  75. <scope>test</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>joda-time</groupId>
  79. <artifactId>joda-time</artifactId>
  80. <version>2.11.1</version>
  81. <scope>test</scope>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.projectlombok</groupId>
  85. <artifactId>lombok</artifactId>
  86. <version>1.18.24</version>
  87. <scope>test</scope>
  88. </dependency>
  89. </dependencies>
  90. <distributionManagement>
  91. <repository>
  92. <id>sonatype-nexus-staging</id>
  93. <name>Nexus Release Repository</name>
  94. <url>${release.repo.url}</url>
  95. </repository>
  96. <snapshotRepository>
  97. <id>sonatype-nexus-staging</id>
  98. <name>Sonatype Nexus Snapshots</name>
  99. <url>${snapshot.repo.url}</url>
  100. <uniqueVersion>false</uniqueVersion>
  101. </snapshotRepository>
  102. </distributionManagement>
  103. <build>
  104. <testResources>
  105. <testResource>
  106. <directory>${basedir}/src/test/resources</directory>
  107. <filtering>true</filtering>
  108. </testResource>
  109. </testResources>
  110. <pluginManagement>
  111. <plugins>
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-resources-plugin</artifactId>
  115. <version>${maven-resources-plugin.version}</version>
  116. </plugin>
  117. <plugin>
  118. <groupId>org.apache.maven.plugins</groupId>
  119. <artifactId>maven-javadoc-plugin</artifactId>
  120. <version>3.4.1</version>
  121. <configuration>
  122. <excludePackageNames>org.yaml.snakeyaml.external.*</excludePackageNames>
  123. </configuration>
  124. </plugin>
  125. <plugin>
  126. <groupId>org.apache.maven.plugins</groupId>
  127. <artifactId>maven-site-plugin</artifactId>
  128. <version>${maven-site-plugin.version}</version>
  129. </plugin>
  130. <plugin>
  131. <groupId>org.apache.maven.plugins</groupId>
  132. <artifactId>maven-jar-plugin</artifactId>
  133. <version>3.2.2</version>
  134. </plugin>
  135. <plugin>
  136. <groupId>org.codehaus.mojo</groupId>
  137. <artifactId>cobertura-maven-plugin</artifactId>
  138. <version>${cobertura-maven-plugin.version}</version>
  139. </plugin>
  140. <plugin>
  141. <groupId>org.apache.maven.plugins</groupId>
  142. <artifactId>maven-compiler-plugin</artifactId>
  143. <version>3.10.1</version>
  144. </plugin>
  145. <plugin>
  146. <groupId>org.codehaus.mojo</groupId>
  147. <artifactId>build-helper-maven-plugin</artifactId>
  148. <version>3.3.0</version>
  149. </plugin>
  150. <plugin>
  151. <groupId>org.apache.maven.plugins</groupId>
  152. <artifactId>maven-surefire-plugin</artifactId>
  153. <version>${maven-surefire-plugin.version}</version>
  154. <configuration>
  155. <environmentVariables>
  156. <EnvironmentKey1>EnvironmentValue1</EnvironmentKey1>
  157. <EnvironmentEmpty />
  158. </environmentVariables>
  159. </configuration>
  160. </plugin>
  161. </plugins>
  162. </pluginManagement>
  163. <plugins>
  164. <plugin>
  165. <groupId>org.apache.maven.plugins</groupId>
  166. <artifactId>maven-enforcer-plugin</artifactId>
  167. <version>3.1.0</version>
  168. <executions>
  169. <execution>
  170. <id>enforce-maven</id>
  171. <goals>
  172. <goal>enforce</goal>
  173. </goals>
  174. <configuration>
  175. <rules>
  176. <requireMavenVersion>
  177. <version>3.3.0</version>
  178. </requireMavenVersion>
  179. </rules>
  180. </configuration>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. <plugin>
  185. <groupId>org.apache.maven.plugins</groupId>
  186. <artifactId>maven-compiler-plugin</artifactId>
  187. <configuration>
  188. <source>${maven.compiler.source}</source>
  189. <target>${maven.compiler.target}</target>
  190. <encoding>${project.build.sourceEncoding}</encoding>
  191. </configuration>
  192. </plugin>
  193. <plugin>
  194. <groupId>org.apache.maven.plugins</groupId>
  195. <artifactId>maven-surefire-plugin</artifactId>
  196. <configuration>
  197. <argLine>-Xmx512m</argLine>
  198. <includes>
  199. <include>**/*Test.java</include>
  200. </includes>
  201. <excludes>
  202. <exclude>**/StressTest.java</exclude>
  203. <exclude>**/ParallelTest.java</exclude>
  204. </excludes>
  205. </configuration>
  206. </plugin>
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-eclipse-plugin</artifactId>
  210. <version>2.10</version>
  211. <configuration>
  212. <buildOutputDirectory>bin</buildOutputDirectory>
  213. </configuration>
  214. </plugin>
  215. <plugin>
  216. <groupId>org.apache.maven.plugins</groupId>
  217. <artifactId>maven-changes-plugin</artifactId>
  218. <version>2.12.1</version>
  219. <executions>
  220. <execution>
  221. <id>validate-changes</id>
  222. <phase>pre-site</phase>
  223. <goals>
  224. <goal>changes-validate</goal>
  225. </goals>
  226. <configuration>
  227. <failOnError>true</failOnError>
  228. </configuration>
  229. </execution>
  230. </executions>
  231. </plugin>
  232. <plugin>
  233. <groupId>org.apache.maven.plugins</groupId>
  234. <artifactId>maven-source-plugin</artifactId>
  235. <version>3.2.1</version>
  236. <executions>
  237. <execution>
  238. <goals>
  239. <goal>jar-no-fork</goal>
  240. </goals>
  241. </execution>
  242. </executions>
  243. </plugin>
  244. <plugin>
  245. <groupId>org.apache.maven.plugins</groupId>
  246. <artifactId>maven-javadoc-plugin</artifactId>
  247. <version>3.4.1</version>
  248. <executions>
  249. <execution>
  250. <id>attach-javadocs</id>
  251. <goals>
  252. <goal>jar</goal>
  253. </goals>
  254. </execution>
  255. </executions>
  256. </plugin>
  257. <plugin>
  258. <groupId>com.mycila.maven-license-plugin</groupId>
  259. <artifactId>maven-license-plugin</artifactId>
  260. <version>1.10.b1</version>
  261. <configuration>
  262. <header>src/etc/header.txt</header>
  263. <quiet>false</quiet>
  264. <failIfMissing>true</failIfMissing>
  265. <aggregate>false</aggregate>
  266. <includes>
  267. <include>src/**/*.java</include>
  268. </includes>
  269. <excludes>
  270. <exclude>src/main/java/org/yaml/snakeyaml/external/**</exclude>
  271. </excludes>
  272. <useDefaultExcludes>true</useDefaultExcludes>
  273. <useDefaultMapping>true</useDefaultMapping>
  274. <strictCheck>true</strictCheck>
  275. <encoding>UTF-8</encoding>
  276. </configuration>
  277. <executions>
  278. <execution>
  279. <phase>site</phase>
  280. <goals>
  281. <goal>format</goal>
  282. </goals>
  283. </execution>
  284. </executions>
  285. </plugin>
  286. <plugin>
  287. <groupId>org.apache.felix</groupId>
  288. <artifactId>maven-bundle-plugin</artifactId>
  289. <version>${maven-bundle-plugin.version}</version>
  290. <extensions>true</extensions>
  291. <configuration>
  292. <instructions>
  293. <_nouses>true</_nouses>
  294. <Export-Package>
  295. !org.yaml.snakeyaml.external*,
  296. org.yaml.snakeyaml.*;version=${project.version}
  297. </Export-Package>
  298. <Automatic-Module-Name>org.yaml.snakeyaml</Automatic-Module-Name>
  299. </instructions>
  300. </configuration>
  301. </plugin>
  302. <plugin>
  303. <artifactId>maven-site-plugin</artifactId>
  304. <version>${maven-site-plugin.version}</version>
  305. <executions>
  306. <execution>
  307. <id>attach-descriptor</id>
  308. <goals>
  309. <goal>attach-descriptor</goal>
  310. </goals>
  311. </execution>
  312. </executions>
  313. </plugin>
  314. <plugin>
  315. <groupId>org.apache.maven.plugins</groupId>
  316. <artifactId>maven-release-plugin</artifactId>
  317. <version>2.5.3</version>
  318. <configuration>
  319. <autoVersionSubmodules>true</autoVersionSubmodules>
  320. <useReleaseProfile>false</useReleaseProfile>
  321. <releaseProfiles>android,release</releaseProfiles>
  322. <goals>deploy nexus-staging:release</goals>
  323. </configuration>
  324. </plugin>
  325. <plugin>
  326. <groupId>org.sonatype.plugins</groupId>
  327. <artifactId>nexus-staging-maven-plugin</artifactId>
  328. <!-- the version is compatible with Nexus, do not change -->
  329. <version>1.6.8</version>
  330. <extensions>true</extensions>
  331. <configuration>
  332. <serverId>sonatype-nexus-staging</serverId>
  333. <nexusUrl>https://oss.sonatype.org/</nexusUrl>
  334. <autoReleaseAfterClose>false</autoReleaseAfterClose>
  335. <keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
  336. <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
  337. </configuration>
  338. </plugin>
  339. </plugins>
  340. </build>
  341. <reporting>
  342. <plugins>
  343. <plugin>
  344. <groupId>org.apache.maven.plugins</groupId>
  345. <artifactId>maven-changes-plugin</artifactId>
  346. <version>2.12.1</version>
  347. <configuration>
  348. <issueLinkTemplate>https://bitbucket.org/snakeyaml/snakeyaml/issues/%ISSUE%</issueLinkTemplate>
  349. </configuration>
  350. <reportSets>
  351. <reportSet>
  352. <reports>
  353. <report>changes-report</report>
  354. </reports>
  355. </reportSet>
  356. </reportSets>
  357. </plugin>
  358. <plugin>
  359. <groupId>org.apache.maven.plugins</groupId>
  360. <artifactId>maven-surefire-report-plugin</artifactId>
  361. <version>${maven-surefire-plugin.version}</version>
  362. <configuration>
  363. <showSuccess>true</showSuccess>
  364. </configuration>
  365. </plugin>
  366. <plugin>
  367. <groupId>org.apache.maven.plugins</groupId>
  368. <artifactId>maven-javadoc-plugin</artifactId>
  369. <reportSets>
  370. <reportSet>
  371. <id>html</id>
  372. <configuration>
  373. <doctitle>API for ${project.name} ${project.version}</doctitle>
  374. <windowtitle>API for ${project.name} ${project.version}</windowtitle>
  375. <testDoctitle>Test API for ${project.name} ${project.version}</testDoctitle>
  376. <testWindowtitle>Test API for ${project.name} ${project.version}</testWindowtitle>
  377. </configuration>
  378. <reports>
  379. <report>javadoc</report>
  380. </reports>
  381. </reportSet>
  382. </reportSets>
  383. </plugin>
  384. </plugins>
  385. </reporting>
  386. <profiles>
  387. <profile>
  388. <id>toolchain</id>
  389. <activation>
  390. <file>
  391. <exists>${user.home}/.m2/toolchains.xml</exists>
  392. </file>
  393. </activation>
  394. <build>
  395. <plugins>
  396. <plugin>
  397. <groupId>org.apache.maven.plugins</groupId>
  398. <artifactId>maven-toolchains-plugin</artifactId>
  399. <version>3.1.0</version>
  400. <executions>
  401. <execution>
  402. <phase>validate</phase>
  403. <goals>
  404. <goal>toolchain</goal>
  405. </goals>
  406. </execution>
  407. </executions>
  408. <configuration>
  409. <toolchains>
  410. <jdk>
  411. <version>${maven.compiler.testTarget}</version>
  412. </jdk>
  413. </toolchains>
  414. </configuration>
  415. </plugin>
  416. </plugins>
  417. </build>
  418. </profile>
  419. <profile>
  420. <id>with-coverage</id>
  421. <build>
  422. <plugins>
  423. <plugin>
  424. <groupId>org.codehaus.mojo</groupId>
  425. <artifactId>cobertura-maven-plugin</artifactId>
  426. <configuration>
  427. <check>
  428. <totalBranchRate>80</totalBranchRate>
  429. <totalLineRate>95</totalLineRate>
  430. </check>
  431. <formats>
  432. <format>html</format>
  433. <format>xml</format>
  434. </formats>
  435. <instrumentation>
  436. <excludes>
  437. <exclude>org/yaml/snakeyaml/external/**</exclude>
  438. </excludes>
  439. </instrumentation>
  440. </configuration>
  441. <executions>
  442. <execution>
  443. <goals>
  444. <goal>clean</goal>
  445. <goal>check</goal>
  446. </goals>
  447. </execution>
  448. </executions>
  449. </plugin>
  450. </plugins>
  451. </build>
  452. <reporting>
  453. <plugins>
  454. <plugin>
  455. <groupId>org.codehaus.mojo</groupId>
  456. <artifactId>cobertura-maven-plugin</artifactId>
  457. <configuration>
  458. <check>
  459. <branchRate>85</branchRate>
  460. <lineRate>85</lineRate>
  461. <haltOnFailure>true</haltOnFailure>
  462. </check>
  463. <formats>
  464. <format>html</format>
  465. <format>xml</format>
  466. </formats>
  467. </configuration>
  468. <reportSets>
  469. <reportSet>
  470. <reports>
  471. <report>cobertura</report>
  472. </reports>
  473. </reportSet>
  474. </reportSets>
  475. </plugin>
  476. </plugins>
  477. </reporting>
  478. </profile>
  479. <profile>
  480. <id>with-java8-tests</id>
  481. <properties>
  482. <maven.compiler.testSource>1.8</maven.compiler.testSource>
  483. <maven.compiler.testTarget>1.8</maven.compiler.testTarget>
  484. </properties>
  485. <build>
  486. <plugins>
  487. <plugin>
  488. <groupId>org.codehaus.mojo</groupId>
  489. <artifactId>build-helper-maven-plugin</artifactId>
  490. <executions>
  491. <execution>
  492. <id>add-java8-test-source</id>
  493. <phase>generate-test-sources</phase>
  494. <goals>
  495. <goal>add-test-source</goal>
  496. </goals>
  497. <configuration>
  498. <sources>
  499. <source>${basedir}/src/test/java8/</source>
  500. </sources>
  501. </configuration>
  502. </execution>
  503. </executions>
  504. </plugin>
  505. </plugins>
  506. </build>
  507. </profile>
  508. <profile>
  509. <id>with-java11-tests</id>
  510. <properties>
  511. <maven.compiler.testSource>11</maven.compiler.testSource>
  512. <maven.compiler.testTarget>11</maven.compiler.testTarget>
  513. </properties>
  514. <build>
  515. <plugins>
  516. <plugin>
  517. <groupId>org.apache.maven.plugins</groupId>
  518. <artifactId>maven-surefire-plugin</artifactId>
  519. <configuration>
  520. <argLine>--illegal-access=${jdk9-illegal-access-level} -Xmx512m</argLine>
  521. </configuration>
  522. </plugin>
  523. <plugin>
  524. <groupId>org.apache.maven.plugins</groupId>
  525. <artifactId>maven-compiler-plugin</artifactId>
  526. <configuration>
  527. <compilerArgs>
  528. <!-- arg>-Xlint:unchecked</arg -->
  529. <arg>-Xlint:deprecation</arg>
  530. </compilerArgs>
  531. </configuration>
  532. </plugin>
  533. <plugin>
  534. <groupId>org.codehaus.mojo</groupId>
  535. <artifactId>build-helper-maven-plugin</artifactId>
  536. <executions>
  537. <execution>
  538. <id>add-java11-test-source</id>
  539. <phase>generate-test-sources</phase>
  540. <goals>
  541. <goal>add-test-source</goal>
  542. </goals>
  543. <configuration>
  544. <sources>
  545. <source>${basedir}/src/test/java8/</source>
  546. <source>${basedir}/src/test/java11/</source>
  547. </sources>
  548. </configuration>
  549. </execution>
  550. </executions>
  551. </plugin>
  552. </plugins>
  553. </build>
  554. </profile>
  555. <profile>
  556. <id>release</id>
  557. <activation>
  558. <property>
  559. <name>performRelease</name>
  560. <value>true</value>
  561. </property>
  562. </activation>
  563. <build>
  564. <plugins>
  565. <plugin>
  566. <groupId>org.apache.maven.plugins</groupId>
  567. <artifactId>maven-gpg-plugin</artifactId>
  568. <version>3.0.1</version>
  569. <executions>
  570. <execution>
  571. <id>sign-artifacts</id>
  572. <phase>verify</phase>
  573. <goals>
  574. <goal>sign</goal>
  575. </goals>
  576. </execution>
  577. </executions>
  578. </plugin>
  579. </plugins>
  580. </build>
  581. </profile>
  582. <profile>
  583. <id>findbugs</id>
  584. <build>
  585. <plugins>
  586. <plugin>
  587. <groupId>org.codehaus.mojo</groupId>
  588. <artifactId>findbugs-maven-plugin</artifactId>
  589. <version>3.0.5</version>
  590. </plugin>
  591. <plugin>
  592. <groupId>org.apache.maven.plugins</groupId>
  593. <artifactId>maven-pmd-plugin</artifactId>
  594. <version>3.19.0</version>
  595. </plugin>
  596. </plugins>
  597. </build>
  598. <reporting>
  599. <plugins>
  600. <plugin>
  601. <groupId>org.apache.maven.plugins</groupId>
  602. <artifactId>maven-jxr-plugin</artifactId>
  603. <version>3.3.0</version>
  604. </plugin>
  605. <plugin>
  606. <groupId>org.codehaus.mojo</groupId>
  607. <artifactId>findbugs-maven-plugin</artifactId>
  608. <version>3.0.5</version>
  609. </plugin>
  610. <plugin>
  611. <groupId>org.apache.maven.plugins</groupId>
  612. <artifactId>maven-pmd-plugin</artifactId>
  613. <version>3.19.0</version>
  614. <configuration>
  615. <linkXref>true</linkXref>
  616. <sourceEncoding>utf-8</sourceEncoding>
  617. <minimumTokens>100</minimumTokens>
  618. <targetJdk>1.8</targetJdk>
  619. <excludes>
  620. <exclude>**/external/*.java</exclude>
  621. </excludes>
  622. </configuration>
  623. </plugin>
  624. </plugins>
  625. </reporting>
  626. </profile>
  627. <profile>
  628. <id>android</id>
  629. <properties>
  630. <android.src>${project.build.directory}/android/src</android.src>
  631. <android.src.main>${android.src}/main/java</android.src.main>
  632. <android.src.test>${android.src}/test/java</android.src.test>
  633. <android.classes>${project.build.directory}/android/classes/</android.classes>
  634. <android.test.classes>${project.build.directory}/android/test-classes/</android.test.classes>
  635. </properties>
  636. <build>
  637. <plugins>
  638. <plugin>
  639. <groupId>org.apache.maven.plugins</groupId>
  640. <artifactId>maven-resources-plugin</artifactId>
  641. <version>${maven-resources-plugin.version}</version>
  642. <executions>
  643. <execution>
  644. <id>copy-src-for-android</id>
  645. <phase>generate-sources</phase>
  646. <goals>
  647. <goal>copy-resources</goal>
  648. </goals>
  649. <configuration>
  650. <outputDirectory>${android.src.main}</outputDirectory>
  651. <resources>
  652. <resource>
  653. <directory>${basedir}/src/main/java</directory>
  654. <filtering>false</filtering>
  655. <excludes>
  656. <exclude>org/yaml/snakeyaml/introspector/MethodProperty.java</exclude>
  657. </excludes>
  658. </resource>
  659. </resources>
  660. </configuration>
  661. </execution>
  662. <execution>
  663. <id>copy-test-src-for-android</id>
  664. <phase>generate-sources</phase>
  665. <goals>
  666. <goal>copy-resources</goal>
  667. </goals>
  668. <configuration>
  669. <outputDirectory>${android.src.test}</outputDirectory>
  670. <resources>
  671. <resource>
  672. <directory>${basedir}/src/test/java</directory>
  673. <filtering>false</filtering>
  674. <excludes>
  675. <exclude>org/yaml/snakeyaml/introspector/MethodProperty.java</exclude>
  676. </excludes>
  677. </resource>
  678. </resources>
  679. </configuration>
  680. </execution>
  681. <execution>
  682. <id>copy-test-resources-for-android</id>
  683. <phase>process-test-resources</phase>
  684. <goals>
  685. <goal>copy-resources</goal>
  686. </goals>
  687. <configuration>
  688. <outputDirectory>${android.test.classes}</outputDirectory>
  689. <resources>
  690. <resource>
  691. <directory>${basedir}/src/test/resources</directory>
  692. <filtering>true</filtering>
  693. </resource>
  694. </resources>
  695. </configuration>
  696. </execution>
  697. </executions>
  698. </plugin>
  699. <plugin>
  700. <groupId>org.apache.maven.plugins</groupId>
  701. <artifactId>maven-patch-plugin</artifactId>
  702. <version>1.2</version>
  703. <configuration>
  704. <patchDirectory>${basedir}/src/patches/android/</patchDirectory>
  705. <targetDirectory>${android.src}</targetDirectory>
  706. <skipApplication>false</skipApplication>
  707. <strip>2</strip>
  708. </configuration>
  709. <executions>
  710. <execution>
  711. <id>android-patches</id>
  712. <phase>process-sources</phase>
  713. <goals>
  714. <goal>apply</goal>
  715. </goals>
  716. <configuration>
  717. <patchTrackingFile>${project.build.directory}/android/patches-applied.txt</patchTrackingFile>
  718. <naturalOrderProcessing>true</naturalOrderProcessing>
  719. </configuration>
  720. </execution>
  721. </executions>
  722. </plugin>
  723. <plugin>
  724. <groupId>org.apache.maven.plugins</groupId>
  725. <artifactId>maven-antrun-plugin</artifactId>
  726. <version>3.1.0</version>
  727. <executions>
  728. <execution>
  729. <id>build-for-android</id>
  730. <phase>compile</phase>
  731. <goals>
  732. <goal>run</goal>
  733. </goals>
  734. <configuration>
  735. <target>
  736. <mkdir dir="${android.classes}" />
  737. <mkdir dir="${android.test.classes}" />
  738. <!-- compile patched sources -->
  739. <javac srcdir="${android.src.main}" destdir="${android.classes}" classpath="${android.classes}" encoding="${project.build.sourceEncoding}" target="1.7" source="1.7" debug="true" includeantruntime="true" fork="true" />
  740. <!-- compile test classes. Exclude some - not for BeanAccess.FIELD -->
  741. <javac srcdir="${android.src.test}:${basedir}/src/test/resources" destdir="${android.test.classes}" classpath="${android.classes}:${android.test.classes}:${junit:junit:jar}:${org.apache.velocity:velocity:jar}:${joda-time:joda-time:jar}:${commons-io:commons-io:jar}:${commons-lang:commons-lang:jar}:${org.hamcrest:hamcrest-core:jar}:${org.projectlombok:lombok:jar}" encoding="${project.build.sourceEncoding}" target="1.7" source="1.7" debug="true" includeantruntime="true" fork="true">
  742. <exclude name="org/yaml/snakeyaml/introspector/MethodPropertyTest.java" />
  743. <exclude name="org/yaml/snakeyaml/representer/FilterPropertyToDumpTest.java" />
  744. <exclude name="org/yaml/snakeyaml/issues/issue60/CustomOrderTest.java" />
  745. <exclude name="org/yaml/snakeyaml/issues/issue29/FlexibleScalarStylesInJavaBeanTest.java" />
  746. <!-- uses filtered resources. Additional tricks needed to be able to run under current build -->
  747. <exclude name="org/yaml/snakeyaml/issues/issue318/ContextClassLoaderTest.java" />
  748. <exclude name="org/yaml/snakeyaml/emitter/template/VelocityTest.java" />
  749. </javac>
  750. </target>
  751. </configuration>
  752. </execution>
  753. </executions>
  754. </plugin>
  755. <plugin>
  756. <artifactId>maven-surefire-plugin</artifactId>
  757. <executions>
  758. <execution>
  759. <id>test-android</id>
  760. <phase>test</phase>
  761. <goals>
  762. <goal>test</goal>
  763. </goals>
  764. <configuration>
  765. <classesDirectory>${android.classes}</classesDirectory>
  766. <reportsDirectory>${project.build.directory}/android/surefire-reports</reportsDirectory>
  767. <testClassesDirectory>${android.test.classes}</testClassesDirectory>
  768. <!--
  769. We ignore test failures for android build at the moment.
  770. Most of the FAILs are because of testing with "property" not "field" access.
  771. But we still fail whole build if there are test errors.
  772. -->
  773. <testFailureIgnore>true</testFailureIgnore>
  774. </configuration>
  775. </execution>
  776. </executions>
  777. </plugin>
  778. <plugin>
  779. <artifactId>maven-jar-plugin</artifactId>
  780. <executions>
  781. <execution>
  782. <id>package-android-jar</id>
  783. <phase>package</phase>
  784. <goals>
  785. <goal>jar</goal>
  786. </goals>
  787. <configuration>
  788. <classesDirectory>${android.classes}</classesDirectory>
  789. <classifier>android</classifier>
  790. </configuration>
  791. </execution>
  792. </executions>
  793. </plugin>
  794. </plugins>
  795. </build>
  796. </profile>
  797. <profile>
  798. <id>reformat</id>
  799. <build>
  800. <plugins>
  801. <plugin>
  802. <groupId>net.revelc.code.formatter</groupId>
  803. <artifactId>formatter-maven-plugin</artifactId>
  804. <executions>
  805. <execution>
  806. <goals>
  807. <goal>format</goal>
  808. </goals>
  809. <configuration>
  810. <configFile>src/etc/eclipse-java-google-style.xml</configFile>
  811. <encoding>UTF-8</encoding>
  812. </configuration>
  813. </execution>
  814. </executions>
  815. </plugin>
  816. </plugins>
  817. </build>
  818. </profile>
  819. </profiles>
  820. </project>