Bump git-commit-id-plugin to 3.0.1
[odlparent.git] / odlparent-lite / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- vi: set et smarttab sw=2 tabstop=2: -->
3 <!--
4  Copyright (c) 2015 The Linux Foundation and others.  All rights reserved.
5
6  This program and the accompanying materials are made available under the
7  terms of the Eclipse Public License v1.0 which accompanies this distribution,
8  and is available at http://www.eclipse.org/legal/epl-v10.html
9 -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12   <modelVersion>4.0.0</modelVersion>
13
14   <!--
15       Note: This parent is not meant to be used by code artifacts. Please use
16             odlparent instead.
17   -->
18
19   <groupId>org.opendaylight.odlparent</groupId>
20   <artifactId>odlparent-lite</artifactId>
21   <version>6.0.0-SNAPSHOT</version>
22   <packaging>pom</packaging>
23   <name>ODL :: odlparent :: ${project.artifactId}</name>
24
25   <!-- Sufficient Metadata for Maven Central Repository deployment
26        These are default, some of which project inheriting from this POM may override (but don't have to, typically)
27        see http://central.sonatype.org/pages/requirements.html
28    -->
29   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
30   <description>OpenDaylight is leading the transformation to Open Software Defined Networking (SDN). For more information, please see https://www.opendaylight.org</description>
31
32   <licenses>
33     <license>
34       <name>Eclipse Public License v1.0</name>
35       <url>https://www.eclipse.org/legal/epl-v10.html</url>
36     </license>
37   </licenses>
38
39   <organization>
40     <name>OpenDaylight</name>
41     <url>https://www.opendaylight.org</url>
42   </organization>
43
44   <issueManagement>
45     <system>JIRA</system>
46     <url>https://jira.opendaylight.org/</url>
47   </issueManagement>
48
49   <ciManagement>
50     <system>Jenkins</system>
51     <url>https://jenkins.opendaylight.org/releng/</url>
52   </ciManagement>
53
54   <scm>
55     <url>https://git.opendaylight.org/gerrit/</url>
56   </scm>
57
58   <developers>
59     <developer>
60       <id>*</id>
61       <name>Please consult the PROJECT_INFO.yaml, README* and/or CONTRIBUTORS which should be included with this JAR</name>
62       <url>https://www.opendaylight.org</url>
63       <email>helpdesk@opendaylight.org</email>
64     </developer>
65   </developers>
66
67   <properties>
68     <nexusproxy>https://nexus.opendaylight.org/content</nexusproxy>
69
70     <!-- Variables required for Maven Site generation -->
71     <nexus.site.url>file:${user.dir}/target/staged-site</nexus.site.url>
72     <odl.site.url>https://nexus.opendaylight.org/content/sites/site/</odl.site.url>
73     <stream>latest</stream><!-- CI should pass in -Dstream={stream} -->
74
75     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
76     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
77
78     <!-- This version property instead of just direct version in pluginManagement is the exception that confirms the rule
79          and is required so that downstream users of the archetype-packaging extension can use this (and get the same version
80          as the maven-archetype-plugin), because there is no "extensionManagement" in Maven -->
81     <maven.archetype.plugin.version>3.1.1</maven.archetype.plugin.version>
82
83     <!-- This property allows deployments to be skipped in child modules -->
84     <maven.deploy.skip>false</maven.deploy.skip>
85
86     <!-- This property allows installations to be skipped in child modules -->
87     <maven.install.skip>false</maven.install.skip>
88
89     <!-- Opt-out from running maven-checkstyle-plugin at all. Defaults to false,
90          set to 'true' in pom.xml of project which desires to completely skip
91          execution. -->
92     <odlparent.checkstyle.skip>false</odlparent.checkstyle.skip>
93
94     <!-- Opt-out from running modernizer-maven-plugin at all. Defaults to false,
95          set to 'true' in pom.xml of project which desires to completely skip
96          execution. -->
97     <odlparent.modernizer.skip>false</odlparent.modernizer.skip>
98
99     <!-- Opt-out from running spotbugs-maven-plugin at all. Defaults to false,
100          set to 'true' in pom.xml of project which desires to completely skip
101          execution. -->
102     <odlparent.spotbugs.skip>false</odlparent.spotbugs.skip>
103
104     <!-- Used in neutron, ovsdb -->
105     <jacoco.version>0.8.4</jacoco.version>
106   </properties>
107
108   <build>
109     <pluginManagement>
110       <plugins>
111         <plugin>
112           <artifactId>maven-archetype-plugin</artifactId>
113           <version>${maven.archetype.plugin.version}</version>
114         </plugin>
115         <plugin>
116           <artifactId>maven-clean-plugin</artifactId>
117           <version>3.1.0</version>
118         </plugin>
119         <plugin>
120           <artifactId>maven-dependency-plugin</artifactId>
121           <version>3.1.1</version>
122           <!-- Needed for https://issues.apache.org/jira/browse/MDEP-613, remove with 3.1.2 upgrade -->
123           <dependencies>
124             <dependency>
125               <groupId>org.apache.maven.shared</groupId>
126               <artifactId>maven-dependency-analyzer</artifactId>
127               <version>1.11.1</version>
128             </dependency>
129           </dependencies>
130         </plugin>
131         <plugin>
132           <artifactId>maven-deploy-plugin</artifactId>
133           <version>2.8.2</version>
134           <configuration>
135             <skip>${maven.deploy.skip}</skip>
136           </configuration>
137         </plugin>
138         <plugin>
139           <artifactId>maven-help-plugin</artifactId>
140           <version>3.2.0</version>
141         </plugin>
142         <plugin>
143           <artifactId>maven-install-plugin</artifactId>
144           <version>2.5.2</version>
145           <configuration>
146             <skip>${maven.install.skip}</skip>
147           </configuration>
148         </plugin>
149         <plugin>
150           <artifactId>maven-javadoc-plugin</artifactId>
151           <version>3.1.1</version>
152           <configuration combine.children="append">
153             <!-- Keep things quiet except for warnings/errors -->
154             <quiet>true</quiet>
155             <tags>
156               <!-- support for HelpMojo generated by the maven-plugin-plugin -->
157               <tag>
158                 <name>goal</name>
159                 <placement>t</placement>
160                 <head>Goal:</head>
161               </tag>
162               <tag>
163                 <name>requiresProject</name>
164                 <placement>t</placement>
165                 <head>Requires project:</head>
166               </tag>
167               <tag>
168                 <name>threadSafe</name>
169                 <placement>t</placement>
170                 <head>Threadsafe</head>
171               </tag>
172               <tag>
173                 <name>phase</name>
174                 <placement>t</placement>
175                 <head>Phase:</head>
176               </tag>
177               <!-- end HelpMojo support -->
178             </tags>
179           </configuration>
180           <executions>
181             <execution>
182               <id>attach-javadocs</id>
183               <goals>
184                 <goal>jar</goal>
185               </goals>
186             </execution>
187           </executions>
188         </plugin>
189         <plugin>
190           <artifactId>maven-project-info-reports-plugin</artifactId>
191           <version>3.0.0</version>
192         </plugin>
193         <plugin>
194           <artifactId>maven-release-plugin</artifactId>
195           <version>2.5.3</version>
196         </plugin>
197         <plugin>
198           <artifactId>maven-site-plugin</artifactId>
199           <version>3.7.1</version>
200           <configuration>
201             <asciidoc>
202               <attributes>
203                 <imagesdir>./images</imagesdir>
204                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
205                 <icons>font</icons>
206                 <source-highlighter>coderay</source-highlighter>
207                 <coderay-css>style</coderay-css>
208               </attributes>
209               <requires>
210                 <require>asciidoctor-diagram</require>
211               </requires>
212             </asciidoc>
213           </configuration>
214           <dependencies>
215             <dependency>
216               <groupId>org.asciidoctor</groupId>
217               <artifactId>asciidoctor-maven-plugin</artifactId>
218               <version>1.5.7.1</version>
219             </dependency>
220             <dependency>
221               <groupId>org.asciidoctor</groupId>
222               <artifactId>asciidoctorj-diagram</artifactId>
223               <version>1.5.16</version>
224             </dependency>
225           </dependencies>
226         </plugin>
227         <plugin>
228           <groupId>org.codehaus.mojo</groupId>
229           <artifactId>build-helper-maven-plugin</artifactId>
230           <version>3.0.0</version>
231         </plugin>
232         <plugin>
233           <groupId>org.codehaus.mojo</groupId>
234           <artifactId>exec-maven-plugin</artifactId>
235           <version>1.6.0</version>
236         </plugin>
237         <plugin>
238           <groupId>org.codehaus.mojo</groupId>
239           <artifactId>jdepend-maven-plugin</artifactId>
240           <version>2.0</version>
241           <executions>
242             <execution>
243               <phase>site</phase>
244               <goals>
245                 <goal>generate-no-fork</goal>
246               </goals>
247             </execution>
248           </executions>
249         </plugin>
250         <plugin>
251           <groupId>org.codehaus.mojo</groupId>
252           <artifactId>versions-maven-plugin</artifactId>
253           <version>2.7</version>
254         </plugin>
255         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
256         <plugin>
257           <groupId>org.eclipse.m2e</groupId>
258           <artifactId>lifecycle-mapping</artifactId>
259           <version>1.0.0</version>
260           <configuration>
261             <lifecycleMappingMetadata>
262               <pluginExecutions>
263                 <pluginExecution>
264                   <pluginExecutionFilter>
265                     <groupId>pl.project13.maven</groupId>
266                     <artifactId>git-commit-id-plugin</artifactId>
267                     <versionRange>[1,)</versionRange>
268                     <goals>
269                       <goal>revision</goal>
270                     </goals>
271                   </pluginExecutionFilter>
272                   <action>
273                     <ignore></ignore>
274                   </action>
275                 </pluginExecution>
276                 <pluginExecution>
277                   <pluginExecutionFilter>
278                     <groupId>org.apache.maven.plugins</groupId>
279                     <artifactId>maven-dependency-plugin</artifactId>
280                     <versionRange>[2.10,)</versionRange>
281                     <goals>
282                       <goal>unpack</goal>
283                     </goals>
284                   </pluginExecutionFilter>
285                   <action>
286                     <ignore></ignore>
287                   </action>
288                 </pluginExecution>
289                 <pluginExecution>
290                   <pluginExecutionFilter>
291                     <groupId>org.apache.maven.plugins</groupId>
292                     <artifactId>maven-enforcer-plugin</artifactId>
293                     <versionRange>[1.0.0,)</versionRange>
294                     <goals>
295                       <goal>enforce</goal>
296                     </goals>
297                   </pluginExecutionFilter>
298                   <action>
299                     <ignore />
300                   </action>
301                 </pluginExecution>
302               </pluginExecutions>
303             </lifecycleMappingMetadata>
304           </configuration>
305         </plugin>
306         <plugin>
307           <groupId>org.jacoco</groupId>
308           <artifactId>jacoco-maven-plugin</artifactId>
309           <version>${jacoco.version}</version>
310         </plugin>
311       </plugins>
312     </pluginManagement>
313
314     <plugins>
315       <plugin>
316         <artifactId>maven-enforcer-plugin</artifactId>
317         <version>3.0.0-M2</version>
318         <executions>
319           <execution>
320             <id>enforce-maven</id>
321             <configuration>
322               <rules>
323                 <requireJavaVersion>
324                   <version>11</version>
325                 </requireJavaVersion>
326                 <requireMavenVersion>
327                   <version>[3.5.0,)</version>
328                 </requireMavenVersion>
329               </rules>
330             </configuration>
331             <goals>
332               <goal>enforce</goal>
333             </goals>
334           </execution>
335         </executions>
336       </plugin>
337       <plugin>
338         <groupId>pl.project13.maven</groupId>
339         <artifactId>git-commit-id-plugin</artifactId>
340         <version>3.0.1</version>
341         <executions>
342           <execution>
343             <id>get-git-infos</id>
344             <goals>
345               <goal>revision</goal>
346             </goals>
347           </execution>
348         </executions>
349         <configuration>
350           <failOnNoGitDirectory>false</failOnNoGitDirectory>
351           <generateGitPropertiesFile>true</generateGitPropertiesFile>
352           <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
353           <gitDescribe>
354             <skip>false</skip>
355             <always>true</always>
356             <tags>true</tags>
357           </gitDescribe>
358           <!-- trust the working directory -->
359           <offline>true</offline>
360         </configuration>
361       </plugin>
362     </plugins>
363   </build>
364
365   <profiles>
366     <profile>
367       <id>ide</id>
368       <activation>
369         <property>
370           <name>m2e.version</name>
371         </property>
372       </activation>
373       <build>
374         <!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
375         <directory>target-ide</directory>
376       </build>
377     </profile>
378     <profile>
379         <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
380              q = http://memory-alpha.wikia.com/wiki/Q ;)
381
382              The Quick profile is used during incremental local development, when you want to "just get that JAR built",
383              which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
384              tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
385              which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
386
387              Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
388              while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
389              from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
390           -->
391       <id>q</id>
392       <properties>
393         <skipTests>true</skipTests>
394             <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
395                  and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
396                  particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
397         <skipIT>true</skipIT>
398         <skipITs>true</skipITs>
399         <skip.karaf.featureTest>true</skip.karaf.featureTest>
400         <jacoco.skip>true</jacoco.skip>
401         <maven.javadoc.skip>true</maven.javadoc.skip>
402         <maven.source.skip>true</maven.source.skip>
403         <odlparent.checkstyle.skip>true</odlparent.checkstyle.skip>
404         <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
405         <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
406         <pmd.skip>true</pmd.skip>
407         <cpd.skip>true</cpd.skip>
408         <maven.site.skip>true</maven.site.skip>
409         <invoker.skip>true</invoker.skip>
410         <enforcer.skip>true</enforcer.skip>
411         <duplicate-finder.skip>true</duplicate-finder.skip>
412         <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
413         <maven.gitcommitid.skip>true</maven.gitcommitid.skip>
414       </properties>
415     </profile>
416     <profile>
417       <!-- http://blog2.vorburger.ch/2016/06/maven-install-into-additional.html
418            mvn [-o -Pq] install -DaddInstallRepositoryPath=.../karaf/system is used in development to directly
419            install artifacts such as bundles and KARs not just into the global shared ~/.m2/repository
420            but also into the isolated Maven repo of a Karaf distribution.
421        -->
422       <activation>
423         <property>
424           <name>addInstallRepositoryPath</name>
425         </property>
426       </activation>
427       <build>
428         <plugins>
429           <plugin>
430             <artifactId>maven-install-plugin</artifactId>
431             <executions>
432               <execution>
433                 <id>additional-install</id>
434                 <phase>install</phase>
435                 <goals>
436                   <goal>install-file</goal>
437                 </goals>
438                 <configuration>
439                   <file>${project.build.directory}/${project.build.finalName}.jar</file>
440                   <localRepositoryPath>${addInstallRepositoryPath}</localRepositoryPath>
441                 </configuration>
442               </execution>
443             </executions>
444           </plugin>
445         </plugins>
446       </build>
447     </profile>
448     <profile>
449       <!--
450           This profile is to ensure we only build javadocs reports
451           when we plan to deploy Maven site for our project.
452
453           It activates by checking for the existance of deploy-site.xml in the
454           user's current working directory. (Intent is that this is run from
455           the Project root directory)
456       -->
457       <id>maven-site</id>
458       <activation>
459         <file>
460           <exists>${user.dir}/deploy-site.xml</exists>
461         </file>
462       </activation>
463
464       <build>
465         <plugins>
466           <plugin>
467             <artifactId>maven-site-plugin</artifactId>
468
469             <executions>
470               <execution>
471                 <id>generate-site</id>
472                 <phase>install</phase>
473                 <goals>
474                   <goal>site</goal>
475                   <goal>attach-descriptor</goal>
476                 </goals>
477               </execution>
478             </executions>
479           </plugin>
480         </plugins>
481       </build>
482
483       <reporting>
484         <plugins>
485           <plugin>
486             <artifactId>maven-project-info-reports-plugin</artifactId>
487             <configuration>
488               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
489             </configuration>
490             <reportSets>
491               <reportSet>
492                 <reports>
493                   <report>index</report>
494                 </reports>
495               </reportSet>
496             </reportSets>
497           </plugin>
498           <plugin>
499             <artifactId>maven-javadoc-plugin</artifactId>
500             <reportSets>
501               <reportSet>
502                 <reports>
503                   <report>javadoc-no-fork</report>
504                   <report>test-javadoc-no-fork</report>
505                 </reports>
506               </reportSet>
507             </reportSets>
508           </plugin>
509         </plugins>
510       </reporting>
511     </profile>
512     <profile>
513       <!-- Javadocs with links -->
514       <id>javadoc-links</id>
515         <activation>
516           <file>
517             <exists>odl-javadoc-links-optin</exists>
518           </file>
519         </activation>
520       <build>
521         <plugins>
522           <plugin>
523             <artifactId>maven-javadoc-plugin</artifactId>
524             <configuration combine.children="append">
525               <links>
526                 <link>https://junit.org/junit4/javadoc/4.11/</link>
527                 <link>http://hamcrest.org/JavaHamcrest/javadoc/2.1/</link>
528                 <link>http://google.github.io/truth/api/0.43/</link>
529                 <link>https://www.slf4j.org/apidocs/</link>
530                 <link>https://xerces.apache.org/xerces2-j/javadocs/api/</link>
531                 <link>https://google.github.io/guava/releases/27.1-jre/api/docs/</link>
532                 <link>http://doc.akka.io/japi/akka/2.5.25/</link>
533                 <link>http://netty.io/4.1/api/</link>
534                 <link>https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/</link>
535                 <link>https://commons.apache.org/proper/commons-lang/javadocs/api-3.9/</link>
536                 <link>https://commons.apache.org/proper/commons-codec/apidocs/</link>
537               </links>
538             </configuration>
539           </plugin>
540         </plugins>
541       </build>
542     </profile>
543
544     <profile>
545       <!-- On JDK9-and-later specify html4 javadoc, if requested-->
546       <id>jdk9-javadoc</id>
547       <activation>
548         <jdk>[9,)</jdk>
549         <file>
550           <exists>odl-javadoc-html5-optout</exists>
551         </file>
552       </activation>
553       <build>
554         <plugins>
555           <plugin>
556             <artifactId>maven-javadoc-plugin</artifactId>
557             <configuration combine.children="append">
558               <additionalOptions>
559                 <additionalOption>-html4</additionalOption>
560               </additionalOptions>
561             </configuration>
562           </plugin>
563         </plugins>
564       </build>
565     </profile>
566
567     <profile>
568       <!-- Disable plugins which are not useful for sonar -->
569       <id>sonar-only</id>
570       <activation>
571         <property>
572           <name>sonar</name>
573         </property>
574       </activation>
575       <properties>
576         <checkstyle.skip>true</checkstyle.skip>
577         <duplicate-finder.skip>true</duplicate-finder.skip>
578         <skip.karaf.featureTest>true</skip.karaf.featureTest>
579         <maven.javadoc.skip>true</maven.javadoc.skip>
580         <maven.source.skip>true</maven.source.skip>
581       </properties>
582     </profile>
583   </profiles>
584
585   <distributionManagement>
586     <repository>
587       <id>opendaylight-release</id>
588       <url>${nexusproxy}/repositories/opendaylight.release/</url>
589     </repository>
590     <snapshotRepository>
591       <id>opendaylight-snapshot</id>
592       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
593     </snapshotRepository>
594     <site>
595       <id>opendaylight-site</id>
596       <url>${nexus.site.url}/${project.artifactId}/</url>
597     </site>
598   </distributionManagement>
599 </project>