• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.32</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.32</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
700                    <plugin>
701                        <groupId>org.apache.maven.plugins</groupId>
702                        <artifactId>maven-patch-plugin</artifactId>
703                        <version>1.2</version>
704                        <configuration>
705                            <patchDirectory>${basedir}/src/patches/android/</patchDirectory>
706                            <targetDirectory>${android.src}</targetDirectory>
707                            <skipApplication>false</skipApplication>
708                            <strip>2</strip>
709                        </configuration>
710                        <executions>
711                            <execution>
712                                <id>android-patches</id>
713                                <phase>process-sources</phase>
714                                <goals>
715                                    <goal>apply</goal>
716                                </goals>
717                                <configuration>
718                                    <patchTrackingFile>${project.build.directory}/android/patches-applied.txt</patchTrackingFile>
719                                    <naturalOrderProcessing>true</naturalOrderProcessing>
720                                </configuration>
721                            </execution>
722                        </executions>
723                    </plugin>
724                    <plugin>
725                        <groupId>org.apache.maven.plugins</groupId>
726                        <artifactId>maven-antrun-plugin</artifactId>
727                        <version>3.1.0</version>
728                        <executions>
729                            <execution>
730                                <id>build-for-android</id>
731                                <phase>compile</phase>
732                                <goals>
733                                    <goal>run</goal>
734                                </goals>
735                                <configuration>
736                                    <target>
737                                        <mkdir dir="${android.classes}" />
738                                        <mkdir dir="${android.test.classes}" />
739
740                                        <!-- compile patched sources -->
741                                        <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" />
742
743                                        <!-- compile test classes. Exclude some - not for BeanAccess.FIELD -->
744                                        <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">
745
746                                            <exclude name="org/yaml/snakeyaml/introspector/MethodPropertyTest.java" />
747                                            <exclude name="org/yaml/snakeyaml/representer/FilterPropertyToDumpTest.java" />
748                                            <exclude name="org/yaml/snakeyaml/issues/issue60/CustomOrderTest.java" />
749                                            <exclude name="org/yaml/snakeyaml/issues/issue29/FlexibleScalarStylesInJavaBeanTest.java" />
750                                            <!-- uses filtered resources. Additional tricks needed to be able to run under current build -->
751                                            <exclude name="org/yaml/snakeyaml/issues/issue318/ContextClassLoaderTest.java" />
752                                            <exclude name="org/yaml/snakeyaml/emitter/template/VelocityTest.java" />
753                                        </javac>
754                                    </target>
755
756                                </configuration>
757                            </execution>
758                        </executions>
759                    </plugin>
760                    <plugin>
761                        <artifactId>maven-surefire-plugin</artifactId>
762                        <executions>
763                            <execution>
764                                <id>test-android</id>
765                                <phase>test</phase>
766                                <goals>
767                                    <goal>test</goal>
768                                </goals>
769                                <configuration>
770                                    <classesDirectory>${android.classes}</classesDirectory>
771                                    <reportsDirectory>${project.build.directory}/android/surefire-reports</reportsDirectory>
772                                    <testClassesDirectory>${android.test.classes}</testClassesDirectory>
773                                    <!--
774                                    We ignore test failures for android build at the moment.
775                                    Most of the FAILs are because of testing with "property" not "field" access.
776                                    But we still fail whole build if there are test errors.
777                                    -->
778                                    <testFailureIgnore>true</testFailureIgnore>
779                                </configuration>
780                            </execution>
781                        </executions>
782                    </plugin>
783                    <plugin>
784                        <artifactId>maven-jar-plugin</artifactId>
785                        <executions>
786                            <execution>
787                                <id>package-android-jar</id>
788                                <phase>package</phase>
789                                <goals>
790                                    <goal>jar</goal>
791                                </goals>
792                                <configuration>
793                                    <classesDirectory>${android.classes}</classesDirectory>
794                                    <classifier>android</classifier>
795                                </configuration>
796                            </execution>
797                        </executions>
798                    </plugin>
799                </plugins>
800            </build>
801        </profile>
802        <profile>
803            <id>reformat</id>
804            <build>
805                <plugins>
806                    <plugin>
807                        <groupId>net.revelc.code.formatter</groupId>
808                        <artifactId>formatter-maven-plugin</artifactId>
809                        <executions>
810                            <execution>
811                                <goals>
812                                    <goal>format</goal>
813                                </goals>
814                                <configuration>
815                                    <configFile>src/etc/eclipse-java-google-style.xml</configFile>
816                                    <encoding>UTF-8</encoding>
817                                </configuration>
818                            </execution>
819                        </executions>
820                    </plugin>
821                </plugins>
822            </build>
823        </profile>
824    </profiles>
825</project>
826