xref: /aosp_15_r20/external/jacoco/org.jacoco.build/pom.xml (revision 7e63c1270baf9bfa84f5b6aecf17bd0c1a75af94)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3   Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
4   This program and the accompanying materials are made available under
5   the terms of the Eclipse Public License 2.0 which is available at
6   http://www.eclipse.org/legal/epl-2.0
7
8   SPDX-License-Identifier: EPL-2.0
9
10   Contributors:
11      Evgeny Mandrikov - initial API and implementation
12-->
13<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">
14  <modelVersion>4.0.0</modelVersion>
15
16  <groupId>org.jacoco</groupId>
17  <artifactId>org.jacoco.build</artifactId>
18  <version>0.8.7</version>
19  <packaging>pom</packaging>
20
21  <name>JaCoCo</name>
22  <description>JaCoCo - Java Code Coverage Library</description>
23  <url>http://jacoco.org</url>
24  <inceptionYear>2009</inceptionYear>
25  <organization>
26    <name>Mountainminds GmbH &amp; Co. KG</name>
27  </organization>
28  <licenses>
29    <license>
30      <name>Eclipse Public License 2.0</name>
31      <url>https://www.eclipse.org/legal/epl-2.0/</url>
32      <distribution>repo</distribution>
33    </license>
34  </licenses>
35
36  <developers>
37    <developer>
38      <id>mtnminds</id>
39      <name>Marc R. Hoffmann</name>
40      <email>[email protected]</email>
41      <timezone>+1</timezone>
42      <roles>
43        <role>Project Lead</role>
44      </roles>
45    </developer>
46    <developer>
47      <id>brock_j</id>
48      <name>Brock Janiczak</name>
49      <email>[email protected]</email>
50      <timezone>+10</timezone>
51      <roles>
52        <role>Developer</role>
53      </roles>
54    </developer>
55    <developer>
56      <id>mandrikov</id>
57      <name>Evgeny Mandrikov</name>
58      <email>[email protected]</email>
59      <url>http://godin.net.ru</url>
60      <organization>SonarSource</organization>
61      <organizationUrl>http://www.sonarsource.com</organizationUrl>
62      <timezone>+3</timezone>
63      <roles>
64        <role>Build and release manager</role>
65      </roles>
66    </developer>
67    <developer>
68      <id>mfriedenhagen</id>
69      <name>Mirko Friedenhagen</name>
70      <email>[email protected]</email>
71      <timezone>+1</timezone>
72      <roles>
73        <role>Developer</role>
74      </roles>
75    </developer>
76  </developers>
77
78  <contributors>
79    <contributor>
80      <name>Radek Liba</name>
81    </contributor>
82    <contributor>
83      <name>Christoph Beck</name>
84    </contributor>
85  </contributors>
86
87  <modules>
88    <!-- Order is important: org.jacoco.agent.rt embeds into org.jacoco.agent and JaCoCo Agent used during tests -->
89    <module>../org.jacoco.core</module>
90    <module>../org.jacoco.report</module>
91    <module>../org.jacoco.agent.rt</module>
92    <module>../org.jacoco.agent</module>
93    <module>../org.jacoco.ant</module>
94    <module>../org.jacoco.cli</module>
95    <module>../org.jacoco.examples</module>
96    <module>../jacoco-maven-plugin</module>
97
98    <module>../org.jacoco.tests</module>
99
100    <module>../org.jacoco.doc</module>
101    <module>../jacoco</module>
102  </modules>
103
104  <scm>
105    <connection>scm:git:git://github.com/jacoco/jacoco.git</connection>
106    <developerConnection>scm:git:ssh://[email protected]:jacoco/jacoco.git</developerConnection>
107    <url>https://github.com/jacoco/jacoco</url>
108  </scm>
109  <issueManagement>
110    <system>GitHub</system>
111    <url>https://github.com/jacoco/jacoco/issues</url>
112  </issueManagement>
113  <distributionManagement>
114    <repository>
115      <id>sonatype-nexus-staging</id>
116      <name>Nexus Release Repository</name>
117      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
118    </repository>
119    <snapshotRepository>
120      <id>sonatype-nexus-snapshots</id>
121      <name>Sonatype Nexus Snapshots</name>
122      <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
123    </snapshotRepository>
124  </distributionManagement>
125
126  <properties>
127    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
128    <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
129
130    <maven.build.timestamp.format>yyyyMMddhhmm</maven.build.timestamp.format>
131    <jacoco.home.url>http://www.jacoco.org/jacoco</jacoco.home.url>
132    <copyright.years>${project.inceptionYear}, 2021</copyright.years>
133
134    <bytecode.version>1.5</bytecode.version>
135    <maven.compiler.source>${bytecode.version}</maven.compiler.source>
136    <maven.compiler.target>${bytecode.version}</maven.compiler.target>
137
138    <jvm.args></jvm.args>
139    <argLine>${jvm.args}</argLine>
140
141    <!-- Dependencies versions -->
142    <asm.version>9.1</asm.version>
143    <ant.version>1.9.15</ant.version>
144    <args4j.version>2.0.28</args4j.version>
145    <junit.version>4.13.1</junit.version>
146    <googlecodeprettify.version>20100721</googlecodeprettify.version>
147
148    <!-- ================== -->
149    <!-- For SonarQube analysis -->
150    <!-- ================== -->
151    <sonar.coverage.jacoco.xmlReportPaths>../org.jacoco.doc/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
152    <sonar.surefire.reportsPath>../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
153
154    <!-- See http://jira.codehaus.org/browse/SONAR-2096 -->
155    <sonar.java.source>1.5</sonar.java.source>
156    <sonar.java.target>1.5</sonar.java.target>
157  </properties>
158
159  <dependencyManagement>
160    <dependencies>
161      <!-- Project dependencies -->
162      <dependency>
163        <groupId>${project.groupId}</groupId>
164        <artifactId>org.jacoco.core</artifactId>
165        <version>${project.version}</version>
166      </dependency>
167      <dependency>
168        <groupId>${project.groupId}</groupId>
169        <artifactId>org.jacoco.report</artifactId>
170        <version>${project.version}</version>
171      </dependency>
172      <dependency>
173        <groupId>${project.groupId}</groupId>
174        <artifactId>org.jacoco.agent</artifactId>
175        <version>${project.version}</version>
176      </dependency>
177      <dependency>
178        <groupId>${project.groupId}</groupId>
179        <artifactId>org.jacoco.agent</artifactId>
180        <classifier>runtime</classifier>
181        <version>${project.version}</version>
182      </dependency>
183      <dependency>
184        <groupId>${project.groupId}</groupId>
185        <artifactId>org.jacoco.agent.rt</artifactId>
186        <version>${project.version}</version>
187      </dependency>
188      <dependency>
189        <groupId>${project.groupId}</groupId>
190        <artifactId>org.jacoco.ant</artifactId>
191        <version>${project.version}</version>
192      </dependency>
193      <dependency>
194        <groupId>${project.groupId}</groupId>
195        <artifactId>org.jacoco.ant</artifactId>
196        <classifier>nodeps</classifier>
197        <version>${project.version}</version>
198      </dependency>
199      <dependency>
200        <groupId>${project.groupId}</groupId>
201        <artifactId>org.jacoco.cli</artifactId>
202        <version>${project.version}</version>
203      </dependency>
204      <dependency>
205        <groupId>${project.groupId}</groupId>
206        <artifactId>org.jacoco.examples</artifactId>
207        <version>${project.version}</version>
208      </dependency>
209      <!-- Third-party dependencies -->
210      <dependency>
211        <groupId>org.ow2.asm</groupId>
212        <artifactId>asm</artifactId>
213        <version>${asm.version}</version>
214      </dependency>
215      <dependency>
216        <groupId>org.ow2.asm</groupId>
217        <artifactId>asm-commons</artifactId>
218        <version>${asm.version}</version>
219      </dependency>
220      <dependency>
221        <groupId>org.ow2.asm</groupId>
222        <artifactId>asm-tree</artifactId>
223        <version>${asm.version}</version>
224      </dependency>
225      <dependency>
226        <groupId>org.ow2.asm</groupId>
227        <artifactId>asm-analysis</artifactId>
228        <version>${asm.version}</version>
229      </dependency>
230      <dependency>
231        <groupId>org.ow2.asm</groupId>
232        <artifactId>asm-util</artifactId>
233        <version>${asm.version}</version>
234      </dependency>
235      <dependency>
236        <groupId>org.apache.ant</groupId>
237        <artifactId>ant</artifactId>
238        <version>${ant.version}</version>
239      </dependency>
240      <dependency>
241        <groupId>org.apache.ant</groupId>
242        <artifactId>ant-junit</artifactId>
243        <version>${ant.version}</version>
244      </dependency>
245      <dependency>
246        <groupId>org.apache.ant</groupId>
247        <artifactId>ant-junit4</artifactId>
248        <version>${ant.version}</version>
249      </dependency>
250      <dependency>
251        <groupId>org.apache.ant</groupId>
252        <artifactId>ant-launcher</artifactId>
253        <version>${ant.version}</version>
254      </dependency>
255      <dependency>
256        <groupId>org.apache.ant</groupId>
257        <artifactId>ant-antunit</artifactId>
258        <version>1.4</version>
259      </dependency>
260      <dependency>
261        <groupId>args4j</groupId>
262        <artifactId>args4j</artifactId>
263        <version>${args4j.version}</version>
264      </dependency>
265      <dependency>
266        <groupId>junit</groupId>
267        <artifactId>junit</artifactId>
268        <version>${junit.version}</version>
269      </dependency>
270    </dependencies>
271  </dependencyManagement>
272
273  <build>
274    <resources>
275      <resource>
276        <directory>src</directory>
277        <filtering>false</filtering>
278        <excludes>
279          <exclude>**/*.java</exclude>
280          <exclude>**/*.kt</exclude>
281          <exclude>**/*.groovy</exclude>
282          <exclude>**/*.scala</exclude>
283          <exclude>**/*.properties</exclude>
284        </excludes>
285      </resource>
286      <resource>
287        <directory>src</directory>
288        <filtering>true</filtering>
289        <includes>
290          <include>**/*.properties</include>
291        </includes>
292        <excludes>
293          <exclude>**/*-test.properties</exclude>
294        </excludes>
295      </resource>
296      <resource>
297        <directory>src</directory>
298        <filtering>false</filtering>
299        <includes>
300          <include>**/*-test.properties</include>
301        </includes>
302      </resource>
303      <resource>
304        <directory>.</directory>
305        <filtering>true</filtering>
306        <includes>
307          <include>about.html</include>
308        </includes>
309      </resource>
310    </resources>
311
312    <pluginManagement>
313      <plugins>
314        <!-- Apache plugins -->
315        <plugin>
316          <groupId>org.apache.maven.plugins</groupId>
317          <artifactId>maven-antrun-plugin</artifactId>
318          <version>1.6</version>
319        </plugin>
320        <plugin>
321          <groupId>org.apache.maven.plugins</groupId>
322          <artifactId>maven-assembly-plugin</artifactId>
323          <version>2.2.1</version>
324        </plugin>
325        <plugin>
326          <groupId>org.apache.maven.plugins</groupId>
327          <artifactId>maven-clean-plugin</artifactId>
328          <version>2.4.1</version>
329        </plugin>
330        <plugin>
331          <groupId>org.apache.maven.plugins</groupId>
332          <artifactId>maven-compiler-plugin</artifactId>
333          <version>3.7.0</version>
334        </plugin>
335        <plugin>
336          <groupId>org.apache.maven.plugins</groupId>
337          <artifactId>maven-dependency-plugin</artifactId>
338          <version>2.2</version>
339        </plugin>
340        <plugin>
341          <groupId>org.apache.maven.plugins</groupId>
342          <artifactId>maven-deploy-plugin</artifactId>
343          <version>2.8.2</version>
344        </plugin>
345        <plugin>
346          <groupId>org.apache.maven.plugins</groupId>
347          <artifactId>maven-enforcer-plugin</artifactId>
348          <version>3.0.0-M2</version>
349        </plugin>
350        <plugin>
351          <groupId>org.apache.maven.plugins</groupId>
352          <artifactId>maven-install-plugin</artifactId>
353          <version>2.3.1</version>
354        </plugin>
355        <plugin>
356          <groupId>org.apache.maven.plugins</groupId>
357          <artifactId>maven-invoker-plugin</artifactId>
358          <version>2.0.0</version>
359        </plugin>
360        <plugin>
361          <groupId>org.apache.maven.plugins</groupId>
362          <artifactId>maven-gpg-plugin</artifactId>
363          <version>1.3</version>
364        </plugin>
365        <plugin>
366          <groupId>org.apache.maven.plugins</groupId>
367          <artifactId>maven-jar-plugin</artifactId>
368          <version>2.3.1</version>
369        </plugin>
370        <plugin>
371          <groupId>org.apache.maven.plugins</groupId>
372          <artifactId>maven-javadoc-plugin</artifactId>
373          <!--
374          Do not upgrade to 3.1.0 because it has troubles with "Automatic-Module-Name"
375          See https://issues.apache.org/jira/browse/MJAVADOC-588
376          -->
377          <version>3.0.1</version>
378          <configuration>
379            <quiet>true</quiet>
380            <detectOfflineLinks>false</detectOfflineLinks>
381          </configuration>
382        </plugin>
383        <plugin>
384          <groupId>org.apache.maven.plugins</groupId>
385          <artifactId>maven-plugin-plugin</artifactId>
386          <version>3.6.0</version>
387          <dependencies>
388            <dependency>
389              <!-- Workaround to be able to compile into Java 13 bytecode -->
390              <groupId>org.ow2.asm</groupId>
391              <artifactId>asm</artifactId>
392              <version>7.1</version>
393            </dependency>
394          </dependencies>
395        </plugin>
396        <plugin>
397          <groupId>org.apache.maven.plugins</groupId>
398          <artifactId>maven-release-plugin</artifactId>
399          <version>2.1</version>
400          <configuration>
401            <autoVersionSubmodules>true</autoVersionSubmodules>
402            <mavenExecutorId>forked-path</mavenExecutorId>
403            <useReleaseProfile>false</useReleaseProfile>
404            <!--
405            Allows to activate release profile during release.
406            We don't use releaseProfiles parameter, because it affects only release:perform goal
407            -->
408            <arguments>-Prelease</arguments>
409          </configuration>
410        </plugin>
411        <plugin>
412          <groupId>org.apache.maven.plugins</groupId>
413          <artifactId>maven-resources-plugin</artifactId>
414          <version>2.5</version>
415        </plugin>
416        <plugin>
417          <groupId>org.apache.maven.plugins</groupId>
418          <artifactId>maven-shade-plugin</artifactId>
419          <version>3.2.1</version>
420          <dependencies>
421            <dependency>
422              <!-- Workaround to be able to compile into Java 13 bytecode -->
423              <groupId>org.ow2.asm</groupId>
424              <artifactId>asm</artifactId>
425              <version>7.1</version>
426            </dependency>
427          </dependencies>
428        </plugin>
429        <plugin>
430          <groupId>org.apache.maven.plugins</groupId>
431          <artifactId>maven-source-plugin</artifactId>
432          <version>2.1.2</version>
433        </plugin>
434        <plugin>
435          <groupId>org.apache.maven.plugins</groupId>
436          <artifactId>maven-surefire-plugin</artifactId>
437          <version>2.9</version>
438        </plugin>
439        <plugin>
440          <groupId>org.apache.maven.plugins</groupId>
441          <artifactId>maven-site-plugin</artifactId>
442          <version>3.3</version>
443        </plugin>
444        <plugin>
445          <groupId>org.apache.maven.plugins</groupId>
446          <artifactId>maven-toolchains-plugin</artifactId>
447          <version>1.0</version>
448        </plugin>
449        <!-- Mojo plugins -->
450        <plugin>
451          <groupId>org.codehaus.mojo</groupId>
452          <artifactId>animal-sniffer-maven-plugin</artifactId>
453          <version>1.6</version>
454        </plugin>
455        <plugin>
456          <groupId>org.codehaus.mojo</groupId>
457          <artifactId>build-helper-maven-plugin</artifactId>
458          <version>1.5</version>
459        </plugin>
460        <plugin>
461          <groupId>org.codehaus.mojo</groupId>
462          <artifactId>buildnumber-maven-plugin</artifactId>
463          <version>1.2</version>
464        </plugin>
465        <plugin>
466          <groupId>org.codehaus.mojo</groupId>
467          <artifactId>xml-maven-plugin</artifactId>
468          <version>1.0</version>
469        </plugin>
470        <plugin>
471          <groupId>org.codehaus.mojo</groupId>
472          <artifactId>exec-maven-plugin</artifactId>
473          <!--  latest version which runs with Java 5 -->
474          <version>1.5.0</version>
475        </plugin>
476        <!-- Third-party plugins -->
477        <plugin>
478          <groupId>com.github.genthaler</groupId>
479          <artifactId>beanshell-maven-plugin</artifactId>
480          <version>1.4</version>
481        </plugin>
482        <plugin>
483          <groupId>org.apache.felix</groupId>
484          <artifactId>maven-bundle-plugin</artifactId>
485          <version>3.5.1</version>
486        </plugin>
487        <plugin>
488          <groupId>com.diffplug.spotless</groupId>
489          <artifactId>spotless-maven-plugin</artifactId>
490          <version>1.24.3</version>
491       </plugin>
492      </plugins>
493    </pluginManagement>
494
495    <plugins>
496      <plugin>
497        <groupId>org.apache.maven.plugins</groupId>
498        <artifactId>maven-surefire-plugin</artifactId>
499        <configuration>
500          <testSourceDirectory>${project.build.sourceDirectory}</testSourceDirectory>
501          <testClassesDirectory>${project.build.outputDirectory}</testClassesDirectory>
502        </configuration>
503      </plugin>
504
505      <plugin>
506        <groupId>org.apache.maven.plugins</groupId>
507        <artifactId>maven-shade-plugin</artifactId>
508        <configuration>
509          <filters>
510            <!-- Don't include signatures -->
511            <filter>
512              <artifact>*:*</artifact>
513              <excludes>
514                <exclude>META-INF/*.SF</exclude>
515                <exclude>META-INF/*.DSA</exclude>
516                <exclude>META-INF/*.RSA</exclude>
517              </excludes>
518            </filter>
519          </filters>
520        </configuration>
521      </plugin>
522
523      <plugin>
524        <groupId>org.apache.maven.plugins</groupId>
525        <artifactId>maven-assembly-plugin</artifactId>
526        <configuration>
527          <archiverConfig>
528            <!-- Workaround for http://jira.codehaus.org/browse/MASSEMBLY-422 -->
529            <!-- 420(dec) = 644(oct) -->
530            <fileMode>420</fileMode>
531            <!-- 493(dec) = 755(oct) -->
532            <directoryMode>493</directoryMode>
533            <defaultDirectoryMode>493</defaultDirectoryMode>
534          </archiverConfig>
535        </configuration>
536      </plugin>
537
538      <plugin>
539        <groupId>org.apache.maven.plugins</groupId>
540        <artifactId>maven-enforcer-plugin</artifactId>
541        <executions>
542          <execution>
543            <id>enforce</id>
544            <phase>validate</phase>
545            <goals>
546              <goal>enforce</goal>
547            </goals>
548            <configuration>
549              <rules>
550                <requireJavaVersion>
551                  <version>1.8</version>
552                </requireJavaVersion>
553                <requireMavenVersion>
554                  <version>3.3.9</version>
555                </requireMavenVersion>
556                <requireNoRepositories>
557                  <message>The rules for repo1.maven.org are that pom.xml files should not include repository definitions.</message>
558                  <banRepositories>true</banRepositories>
559                  <banPluginRepositories>true</banPluginRepositories>
560                </requireNoRepositories>
561                <requireReleaseDeps>
562                  <message>No SNAPSHOT versions allowed for dependencies</message>
563                  <onlyWhenRelease>true</onlyWhenRelease>
564                </requireReleaseDeps>
565              </rules>
566            </configuration>
567          </execution>
568        </executions>
569      </plugin>
570
571      <plugin>
572        <groupId>com.diffplug.spotless</groupId>
573        <artifactId>spotless-maven-plugin</artifactId>
574        <configuration>
575          <java>
576            <lineEndings>UNIX</lineEndings>
577            <includes>
578              <include>src/**/*.java</include>
579            </includes>
580            <eclipse>
581              <version>4.12.0</version>
582              <file>../org.jacoco.core/.settings/org.eclipse.jdt.core.prefs</file>
583            </eclipse>
584            <trimTrailingWhitespace/>
585            <endWithNewline/>
586          </java>
587          <formats>
588            <format>
589              <includes>
590                <include>**/*.properties</include>
591                <include>**/*.html</include>
592                <include>**/*.css</include>
593                <include>**/*.js</include>
594                <include>**/*.xml</include>
595                <include>**/*.xsl</include>
596                <include>**/*.dtd</include>
597              </includes>
598              <excludes>
599                <exclude>target/**</exclude>
600              </excludes>
601              <lineEndings>UNIX</lineEndings>
602              <trimTrailingWhitespace/>
603              <endWithNewline/>
604            </format>
605          </formats>
606        </configuration>
607        <executions>
608          <execution>
609            <phase>prepare-package</phase>
610            <goals>
611              <goal>check</goal>
612            </goals>
613          </execution>
614        </executions>
615      </plugin>
616
617      <plugin>
618        <groupId>org.apache.maven.plugins</groupId>
619        <artifactId>maven-antrun-plugin</artifactId>
620        <executions>
621          <execution>
622            <id>check-license-header</id>
623            <phase>validate</phase>
624            <goals>
625              <goal>run</goal>
626            </goals>
627            <configuration>
628              <target>
629                <fileset dir="${basedir}" includes="**/*.java,**/*.xml,**/*.bsh" excludes="target/**,.idea/**,nb-configuration.xml" id="missinglicense.fileset">
630                  <include name="**/*.kt"/>
631                  <include name="**/*.groovy"/>
632                  <include name="**/*.scala"/>
633                  <not>
634                    <and>
635                      <contains text="Copyright (c) 2009, 2021 Mountainminds GmbH &amp; Co. KG and Contributors"/>
636                      <contains text="This program and the accompanying materials are made available under"/>
637                      <contains text="the terms of the Eclipse Public License 2.0 which is available at"/>
638                      <contains text="http://www.eclipse.org/legal/epl-2.0"/>
639                      <contains text="SPDX-License-Identifier: EPL-2.0"/>
640                    </and>
641                  </not>
642                </fileset>
643                <pathconvert property="missing" refid="missinglicense.fileset"/>
644                <fail message="Invalid license info in: ${missing}">
645                  <condition>
646                    <not>
647                      <equals arg1="${missing}" arg2=""/>
648                    </not>
649                  </condition>
650                </fail>
651              </target>
652            </configuration>
653          </execution>
654        </executions>
655      </plugin>
656
657      <plugin>
658        <groupId>org.codehaus.mojo</groupId>
659        <artifactId>build-helper-maven-plugin</artifactId>
660        <executions>
661          <execution>
662            <id>parse-version</id>
663            <phase>validate</phase>
664            <goals>
665              <goal>parse-version</goal>
666            </goals>
667          </execution>
668        </executions>
669      </plugin>
670
671      <plugin>
672        <groupId>org.codehaus.mojo</groupId>
673        <artifactId>buildnumber-maven-plugin</artifactId>
674        <executions>
675          <execution>
676            <phase>validate</phase>
677            <goals>
678              <goal>create</goal>
679            </goals>
680          </execution>
681        </executions>
682        <configuration>
683          <doCheck>false</doCheck>
684          <doUpdate>false</doUpdate>
685          <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
686          <revisionOnScmFailure>0000000</revisionOnScmFailure>
687        </configuration>
688      </plugin>
689
690      <plugin>
691        <groupId>com.github.genthaler</groupId>
692        <artifactId>beanshell-maven-plugin</artifactId>
693        <executions>
694          <execution>
695            <id>parse-version</id>
696            <phase>validate</phase>
697            <goals>
698              <goal>run</goal>
699            </goals>
700            <configuration>
701              <quiet>true</quiet>
702              <script><![CDATA[
703                major = project.getProperties().get("parsedVersion.majorVersion");
704                minor = project.getProperties().get("parsedVersion.minorVersion");
705                incremental = project.getProperties().get("parsedVersion.incrementalVersion");
706                unqualifiedVersion = major + "." + minor + "." + incremental;
707                project.getProperties().setProperty("unqualifiedVersion", unqualifiedVersion);
708
709                qualifier = "${maven.build.timestamp}";
710                project.getProperties().setProperty("buildQualifier", qualifier);
711
712                qualifiedVersion = unqualifiedVersion + "." + qualifier;
713                project.getProperties().setProperty("qualified.bundle.version", qualifiedVersion);
714
715                buildDate = qualifier.substring(0, 4) + "/" + qualifier.substring(4, 6) + "/" + qualifier.substring(6, 8);
716                project.getProperties().setProperty("build.date", buildDate);
717
718                buildNumber = project.getProperties().get("buildNumber");
719                pkgName = buildNumber.substring(buildNumber.length() - 7, buildNumber.length());
720                project.getProperties().setProperty("jacoco.runtime.package.name", "org.jacoco.agent.rt.internal_" + pkgName);
721
722                void loadLicense(String libraryId) {
723                    version = project.getProperties().get(libraryId + ".version");
724                    path = project.getBasedir().toPath().resolve("../org.jacoco.build/licenses/" + libraryId + "-" + version + ".html");
725                    license = new String(java.nio.file.Files.readAllBytes(path), "UTF-8");
726                    project.getProperties().setProperty(libraryId + ".license", license);
727                }
728                loadLicense("args4j");
729                loadLicense("asm");
730                loadLicense("googlecodeprettify");
731              ]]>
732              </script>
733            </configuration>
734          </execution>
735        </executions>
736      </plugin>
737
738      <plugin>
739        <groupId>org.apache.felix</groupId>
740        <artifactId>maven-bundle-plugin</artifactId>
741        <configuration>
742          <instructions>
743            <Automatic-Module-Name>${project.artifactId}</Automatic-Module-Name>
744            <Bundle-Version>${qualified.bundle.version}</Bundle-Version>
745            <Bundle-Name>${project.description}</Bundle-Name>
746            <Export-Package>
747              !about.html,
748              *.internal*;x-internal:=true;version="${version;===;${Bundle-Version}}",
749              *;version="${version;===;${Bundle-Version}}"
750            </Export-Package>
751            <Import-Package>
752              org.jacoco.*;version="${range;[===,==+);${Bundle-Version}}",
753              org.objectweb.asm.*;version="${range;[===,=+);${asm.version}}"
754            </Import-Package>
755            <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
756            <Eclipse-SourceReferences>scm:git:git://github.com/jacoco/jacoco.git;path="${project.artifactId}";commitId=${buildNumber}</Eclipse-SourceReferences>
757          </instructions>
758        </configuration>
759      </plugin>
760    </plugins>
761  </build>
762
763  <profiles>
764    <!-- http://openjdk.java.net/jeps/182 -->
765    <profile>
766      <id>maven-jdk9</id>
767      <activation>
768        <jdk>[9,12)</jdk>
769      </activation>
770      <properties>
771        <bytecode.version>6</bytecode.version>
772      </properties>
773    </profile>
774
775    <profile>
776      <id>maven-jdk12</id>
777      <activation>
778        <jdk>[12,)</jdk>
779      </activation>
780      <properties>
781        <bytecode.version>7</bytecode.version>
782      </properties>
783    </profile>
784
785    <!-- This profile enables use of JDK from Maven Toolchains -->
786    <profile>
787      <id>integration-tests</id>
788      <activation>
789        <property>
790          <name>jdk.version</name>
791        </property>
792      </activation>
793      <build>
794        <plugins>
795          <!-- See http://maven.apache.org/guides/mini/guide-using-toolchains.html -->
796          <plugin>
797            <groupId>org.apache.maven.plugins</groupId>
798            <artifactId>maven-toolchains-plugin</artifactId>
799            <executions>
800              <execution>
801                <phase>validate</phase>
802                <goals>
803                  <goal>toolchain</goal>
804                </goals>
805              </execution>
806            </executions>
807            <configuration>
808              <toolchains>
809                <jdk>
810                  <version>${jdk.version}</version>
811                </jdk>
812              </toolchains>
813            </configuration>
814          </plugin>
815        </plugins>
816      </build>
817    </profile>
818
819    <!--
820    Following profiles enable compilation into bytecode version 13
821    when requested "bytecode.version" greater than 13,
822    because this is maximum that can be processed by
823    maven-shade-plugin and maven-plugin-plugin.
824    This is overridden for tests.
825    -->
826    <profile>
827      <id>java14-bytecode</id>
828      <activation>
829        <property>
830          <name>bytecode.version</name>
831          <value>14</value>
832        </property>
833      </activation>
834      <properties>
835        <maven.compiler.source>13</maven.compiler.source>
836        <maven.compiler.target>13</maven.compiler.target>
837      </properties>
838    </profile>
839
840    <profile>
841      <id>java15-bytecode</id>
842      <activation>
843        <property>
844          <name>bytecode.version</name>
845          <value>15</value>
846        </property>
847      </activation>
848      <properties>
849        <maven.compiler.source>13</maven.compiler.source>
850        <maven.compiler.target>13</maven.compiler.target>
851      </properties>
852    </profile>
853
854    <profile>
855      <id>java16-bytecode</id>
856      <activation>
857        <property>
858          <name>bytecode.version</name>
859          <value>16</value>
860        </property>
861      </activation>
862      <properties>
863        <maven.compiler.source>13</maven.compiler.source>
864        <maven.compiler.target>13</maven.compiler.target>
865      </properties>
866    </profile>
867
868    <profile>
869      <id>java17-bytecode</id>
870      <activation>
871        <property>
872          <name>bytecode.version</name>
873          <value>17</value>
874        </property>
875      </activation>
876      <properties>
877        <maven.compiler.source>13</maven.compiler.source>
878        <maven.compiler.target>13</maven.compiler.target>
879      </properties>
880    </profile>
881
882    <!-- This profile enables use of ECJ -->
883    <profile>
884      <id>ecj</id>
885      <activation>
886        <property>
887          <name>ecj</name>
888        </property>
889      </activation>
890      <build>
891        <plugins>
892          <plugin>
893            <groupId>org.apache.maven.plugins</groupId>
894            <artifactId>maven-compiler-plugin</artifactId>
895            <configuration>
896              <compilerId>eclipse</compilerId>
897              <source>1.8</source>
898              <target>1.8</target>
899            </configuration>
900            <dependencies>
901              <dependency>
902                <groupId>org.eclipse.jdt.core.compiler</groupId>
903                <artifactId>ecj</artifactId>
904                <version>4.6.1</version>
905              </dependency>
906              <dependency>
907                <groupId>org.codehaus.plexus</groupId>
908                <artifactId>plexus-compiler-eclipse</artifactId>
909                <version>2.8.1</version>
910              </dependency>
911            </dependencies>
912          </plugin>
913        </plugins>
914      </build>
915    </profile>
916
917    <!--
918    Profiles for different JDK versions:
919    -->
920
921    <profile>
922      <id>jdk6</id>
923      <activation>
924        <property>
925          <name>jdk.version</name>
926          <value>6</value>
927        </property>
928      </activation>
929      <properties>
930        <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
931      </properties>
932    </profile>
933
934    <profile>
935      <id>jdk7</id>
936      <activation>
937        <property>
938          <name>jdk.version</name>
939          <value>7</value>
940        </property>
941      </activation>
942      <properties>
943        <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
944      </properties>
945    </profile>
946
947    <profile>
948      <id>jdk8</id>
949      <activation>
950        <property>
951          <name>jdk.version</name>
952          <value>8</value>
953        </property>
954      </activation>
955      <properties>
956        <jvm.args>-XX:-FailOverToOldVerifier -Xverify:all</jvm.args>
957      </properties>
958    </profile>
959
960    <profile>
961      <id>jdk9</id>
962      <activation>
963        <property>
964          <name>jdk.version</name>
965          <value>9</value>
966        </property>
967      </activation>
968      <properties>
969        <bytecode.version>6</bytecode.version>
970      </properties>
971    </profile>
972
973    <profile>
974      <id>jdk10</id>
975      <activation>
976        <property>
977          <name>jdk.version</name>
978          <value>10</value>
979        </property>
980      </activation>
981      <properties>
982        <bytecode.version>6</bytecode.version>
983      </properties>
984    </profile>
985
986    <profile>
987      <id>jdk11</id>
988      <activation>
989        <property>
990          <name>jdk.version</name>
991          <value>11</value>
992        </property>
993      </activation>
994      <properties>
995        <bytecode.version>6</bytecode.version>
996      </properties>
997    </profile>
998
999    <profile>
1000      <id>jdk12</id>
1001      <activation>
1002        <property>
1003          <name>jdk.version</name>
1004          <value>12</value>
1005        </property>
1006      </activation>
1007      <properties>
1008        <bytecode.version>7</bytecode.version>
1009      </properties>
1010    </profile>
1011
1012    <!-- This profile enables generation of JARs with sources and javadocs -->
1013    <profile>
1014      <id>sources</id>
1015      <activation>
1016        <file>
1017          <exists>src/</exists>
1018        </file>
1019      </activation>
1020      <build>
1021        <plugins>
1022          <!-- Generates jar with sources -->
1023          <plugin>
1024            <groupId>org.apache.maven.plugins</groupId>
1025            <artifactId>maven-source-plugin</artifactId>
1026            <executions>
1027              <execution>
1028                <id>attach-sources</id>
1029                <phase>verify</phase>
1030                <goals>
1031                  <goal>jar-no-fork</goal>
1032                </goals>
1033              </execution>
1034            </executions>
1035          </plugin>
1036          <!-- Generates Javadoc -->
1037          <plugin>
1038            <groupId>org.apache.maven.plugins</groupId>
1039            <artifactId>maven-javadoc-plugin</artifactId>
1040            <executions>
1041              <execution>
1042                <id>attach-javadocs</id>
1043                <goals>
1044                  <goal>jar</goal>
1045                </goals>
1046              </execution>
1047            </executions>
1048          </plugin>
1049        </plugins>
1050      </build>
1051    </profile>
1052
1053    <!-- This profile is activated when a project is released. -->
1054    <profile>
1055      <id>release</id>
1056      <build>
1057        <plugins>
1058          <plugin>
1059            <groupId>org.apache.maven.plugins</groupId>
1060            <artifactId>maven-enforcer-plugin</artifactId>
1061            <inherited>false</inherited>
1062            <executions>
1063              <execution>
1064                <id>enforce-release-rules</id>
1065                <phase>verify</phase>
1066                <goals>
1067                  <goal>enforce</goal>
1068                </goals>
1069                <configuration>
1070                  <rules>
1071                    <requireReleaseVersion/>
1072                    <requireProperty>
1073                      <property>buildNumber</property>
1074                      <regex>[0-9a-f]{40}</regex>
1075                    </requireProperty>
1076                  </rules>
1077                </configuration>
1078              </execution>
1079            </executions>
1080          </plugin>
1081          <!-- Checks compatibility with Java API -->
1082          <plugin>
1083            <groupId>org.codehaus.mojo</groupId>
1084            <artifactId>animal-sniffer-maven-plugin</artifactId>
1085            <executions>
1086              <execution>
1087                <id>enforce-java-api-compatibility</id>
1088                <phase>verify</phase>
1089                <goals>
1090                  <goal>check</goal>
1091                </goals>
1092                <configuration>
1093                  <signature>
1094                    <groupId>org.codehaus.mojo.signature</groupId>
1095                    <artifactId>java15</artifactId>
1096                    <version>1.0</version>
1097                  </signature>
1098                </configuration>
1099              </execution>
1100            </executions>
1101          </plugin>
1102          <!-- Signs artifacts -->
1103          <plugin>
1104            <groupId>org.apache.maven.plugins</groupId>
1105            <artifactId>maven-gpg-plugin</artifactId>
1106            <executions>
1107              <execution>
1108                <id>sign-artifacts</id>
1109                <phase>verify</phase>
1110                <goals>
1111                  <goal>sign</goal>
1112                </goals>
1113              </execution>
1114            </executions>
1115          </plugin>
1116        </plugins>
1117      </build>
1118    </profile>
1119
1120    <!-- This profile is active only when used from Eclipse m2e and is used only to store settings. -->
1121    <profile>
1122      <id>m2e</id>
1123      <activation>
1124        <property>
1125          <name>m2e.version</name>
1126        </property>
1127      </activation>
1128      <build>
1129        <pluginManagement>
1130          <plugins>
1131            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
1132            <plugin>
1133              <groupId>org.eclipse.m2e</groupId>
1134              <artifactId>lifecycle-mapping</artifactId>
1135              <version>1.0.0</version>
1136              <configuration>
1137                <lifecycleMappingMetadata>
1138                  <pluginExecutions>
1139                    <pluginExecution>
1140                      <pluginExecutionFilter>
1141                        <groupId>org.apache.maven.plugins</groupId>
1142                        <artifactId>maven-antrun-plugin</artifactId>
1143                        <versionRange>[0,)</versionRange>
1144                        <goals>
1145                          <goal>run</goal>
1146                        </goals>
1147                      </pluginExecutionFilter>
1148                      <action>
1149                        <ignore></ignore>
1150                      </action>
1151                    </pluginExecution>
1152                    <pluginExecution>
1153                      <pluginExecutionFilter>
1154                        <groupId>org.apache.maven.plugins</groupId>
1155                        <artifactId>maven-invoker-plugin</artifactId>
1156                        <versionRange>[0,)</versionRange>
1157                        <goals>
1158                          <goal>install</goal>
1159                        </goals>
1160                      </pluginExecutionFilter>
1161                      <action>
1162                        <ignore></ignore>
1163                      </action>
1164                    </pluginExecution>
1165                    <pluginExecution>
1166                      <pluginExecutionFilter>
1167                        <groupId>org.apache.maven.plugins</groupId>
1168                        <artifactId>maven-dependency-plugin</artifactId>
1169                        <versionRange>[0,)</versionRange>
1170                        <goals>
1171                          <goal>unpack</goal>
1172                          <goal>copy-dependencies</goal>
1173                        </goals>
1174                      </pluginExecutionFilter>
1175                      <action>
1176                        <ignore></ignore>
1177                      </action>
1178                    </pluginExecution>
1179                    <pluginExecution>
1180                      <pluginExecutionFilter>
1181                        <groupId>org.codehaus.groovy.maven</groupId>
1182                        <artifactId>gmaven-plugin</artifactId>
1183                        <versionRange>[0,)</versionRange>
1184                        <goals>
1185                          <goal>execute</goal>
1186                        </goals>
1187                      </pluginExecutionFilter>
1188                      <action>
1189                        <ignore></ignore>
1190                      </action>
1191                    </pluginExecution>
1192                    <pluginExecution>
1193                      <pluginExecutionFilter>
1194                        <groupId>org.codehaus.mojo</groupId>
1195                        <artifactId>xml-maven-plugin</artifactId>
1196                        <versionRange>[0,)</versionRange>
1197                        <goals>
1198                          <goal>transform</goal>
1199                        </goals>
1200                      </pluginExecutionFilter>
1201                      <action>
1202                        <ignore></ignore>
1203                      </action>
1204                    </pluginExecution>
1205                    <pluginExecution>
1206                      <pluginExecutionFilter>
1207                        <groupId>org.jacoco</groupId>
1208                        <artifactId>jacoco-maven-plugin</artifactId>
1209                        <versionRange>[0,)</versionRange>
1210                        <goals>
1211                          <goal>prepare-agent</goal>
1212                        </goals>
1213                      </pluginExecutionFilter>
1214                      <action>
1215                        <ignore></ignore>
1216                      </action>
1217                    </pluginExecution>
1218                    <pluginExecution>
1219                      <pluginExecutionFilter>
1220                        <groupId>org.apache.maven.plugins</groupId>
1221                        <artifactId>maven-enforcer-plugin</artifactId>
1222                        <versionRange>[0,)</versionRange>
1223                        <goals>
1224                          <goal>enforce</goal>
1225                        </goals>
1226                      </pluginExecutionFilter>
1227                      <action>
1228                        <ignore></ignore>
1229                      </action>
1230                    </pluginExecution>
1231                    <pluginExecution>
1232                      <pluginExecutionFilter>
1233                        <groupId>org.codehaus.mojo</groupId>
1234                        <artifactId>build-helper-maven-plugin</artifactId>
1235                        <versionRange>[0,)</versionRange>
1236                        <goals>
1237                          <goal>parse-version</goal>
1238                        </goals>
1239                      </pluginExecutionFilter>
1240                      <action>
1241                        <ignore></ignore>
1242                      </action>
1243                    </pluginExecution>
1244                  </pluginExecutions>
1245                </lifecycleMappingMetadata>
1246              </configuration>
1247            </plugin>
1248          </plugins>
1249        </pluginManagement>
1250      </build>
1251    </profile>
1252  </profiles>
1253
1254</project>
1255