Move build-helper-maven-plugin declaration
[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     <!-- Used in neutron, ovsdb -->
90     <jacoco.version>0.8.4</jacoco.version>
91   </properties>
92
93   <build>
94     <pluginManagement>
95       <plugins>
96         <plugin>
97           <artifactId>maven-archetype-plugin</artifactId>
98           <version>${maven.archetype.plugin.version}</version>
99         </plugin>
100         <plugin>
101           <artifactId>maven-clean-plugin</artifactId>
102           <version>3.1.0</version>
103         </plugin>
104         <plugin>
105           <artifactId>maven-dependency-plugin</artifactId>
106           <version>3.1.1</version>
107         </plugin>
108         <plugin>
109           <artifactId>maven-deploy-plugin</artifactId>
110           <version>2.8.2</version>
111           <configuration>
112             <skip>${maven.deploy.skip}</skip>
113           </configuration>
114         </plugin>
115         <plugin>
116           <artifactId>maven-help-plugin</artifactId>
117           <version>3.2.0</version>
118         </plugin>
119         <plugin>
120           <artifactId>maven-install-plugin</artifactId>
121           <version>2.5.2</version>
122           <configuration>
123             <skip>${maven.install.skip}</skip>
124           </configuration>
125         </plugin>
126         <plugin>
127           <artifactId>maven-javadoc-plugin</artifactId>
128           <version>3.1.1</version>
129           <configuration combine.children="append">
130             <!-- Keep things quiet except for warnings/errors -->
131             <quiet>true</quiet>
132             <tags>
133               <!-- support for HelpMojo generated by the maven-plugin-plugin -->
134               <tag>
135                 <name>goal</name>
136                 <placement>t</placement>
137                 <head>Goal:</head>
138               </tag>
139               <tag>
140                 <name>requiresProject</name>
141                 <placement>t</placement>
142                 <head>Requires project:</head>
143               </tag>
144               <tag>
145                 <name>threadSafe</name>
146                 <placement>t</placement>
147                 <head>Threadsafe</head>
148               </tag>
149               <tag>
150                 <name>phase</name>
151                 <placement>t</placement>
152                 <head>Phase:</head>
153               </tag>
154               <!-- end HelpMojo support -->
155             </tags>
156           </configuration>
157           <executions>
158             <execution>
159               <id>attach-javadocs</id>
160               <goals>
161                 <goal>jar</goal>
162               </goals>
163             </execution>
164           </executions>
165         </plugin>
166         <plugin>
167           <artifactId>maven-project-info-reports-plugin</artifactId>
168           <version>3.0.0</version>
169         </plugin>
170         <plugin>
171           <artifactId>maven-release-plugin</artifactId>
172           <version>2.5.3</version>
173         </plugin>
174         <plugin>
175           <artifactId>maven-site-plugin</artifactId>
176           <version>3.7.1</version>
177           <configuration>
178             <asciidoc>
179               <attributes>
180                 <imagesdir>./images</imagesdir>
181                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
182                 <icons>font</icons>
183                 <source-highlighter>coderay</source-highlighter>
184                 <coderay-css>style</coderay-css>
185               </attributes>
186               <requires>
187                 <require>asciidoctor-diagram</require>
188               </requires>
189             </asciidoc>
190           </configuration>
191           <dependencies>
192             <dependency>
193               <groupId>org.asciidoctor</groupId>
194               <artifactId>asciidoctor-maven-plugin</artifactId>
195               <version>1.5.7.1</version>
196             </dependency>
197             <dependency>
198               <groupId>org.asciidoctor</groupId>
199               <artifactId>asciidoctorj-diagram</artifactId>
200               <version>1.5.16</version>
201             </dependency>
202           </dependencies>
203         </plugin>
204         <plugin>
205           <groupId>org.codehaus.mojo</groupId>
206           <artifactId>build-helper-maven-plugin</artifactId>
207           <version>3.0.0</version>
208         </plugin>
209         <plugin>
210           <groupId>org.codehaus.mojo</groupId>
211           <artifactId>exec-maven-plugin</artifactId>
212           <version>1.6.0</version>
213         </plugin>
214         <plugin>
215           <groupId>org.codehaus.mojo</groupId>
216           <artifactId>jdepend-maven-plugin</artifactId>
217           <version>2.0</version>
218           <executions>
219             <execution>
220               <phase>site</phase>
221               <goals>
222                 <goal>generate-no-fork</goal>
223               </goals>
224             </execution>
225           </executions>
226         </plugin>
227         <plugin>
228           <groupId>org.codehaus.mojo</groupId>
229           <artifactId>versions-maven-plugin</artifactId>
230           <version>2.7</version>
231         </plugin>
232         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
233         <plugin>
234           <groupId>org.eclipse.m2e</groupId>
235           <artifactId>lifecycle-mapping</artifactId>
236           <version>1.0.0</version>
237           <configuration>
238             <lifecycleMappingMetadata>
239               <pluginExecutions>
240                 <pluginExecution>
241                   <pluginExecutionFilter>
242                     <groupId>pl.project13.maven</groupId>
243                     <artifactId>git-commit-id-plugin</artifactId>
244                     <versionRange>[1,)</versionRange>
245                     <goals>
246                       <goal>revision</goal>
247                     </goals>
248                   </pluginExecutionFilter>
249                   <action>
250                     <ignore></ignore>
251                   </action>
252                 </pluginExecution>
253                 <pluginExecution>
254                   <pluginExecutionFilter>
255                     <groupId>org.apache.maven.plugins</groupId>
256                     <artifactId>maven-dependency-plugin</artifactId>
257                     <versionRange>[2.10,)</versionRange>
258                     <goals>
259                       <goal>unpack</goal>
260                     </goals>
261                   </pluginExecutionFilter>
262                   <action>
263                     <ignore></ignore>
264                   </action>
265                 </pluginExecution>
266                 <pluginExecution>
267                   <pluginExecutionFilter>
268                     <groupId>org.apache.maven.plugins</groupId>
269                     <artifactId>maven-enforcer-plugin</artifactId>
270                     <versionRange>[1.0.0,)</versionRange>
271                     <goals>
272                       <goal>enforce</goal>
273                     </goals>
274                   </pluginExecutionFilter>
275                   <action>
276                     <ignore />
277                   </action>
278                 </pluginExecution>
279               </pluginExecutions>
280             </lifecycleMappingMetadata>
281           </configuration>
282         </plugin>
283         <plugin>
284           <groupId>org.jacoco</groupId>
285           <artifactId>jacoco-maven-plugin</artifactId>
286           <version>${jacoco.version}</version>
287         </plugin>
288       </plugins>
289     </pluginManagement>
290
291     <plugins>
292       <plugin>
293         <artifactId>maven-enforcer-plugin</artifactId>
294         <version>3.0.0-M2</version>
295         <executions>
296           <execution>
297             <id>enforce-maven</id>
298             <configuration>
299               <rules>
300                 <requireJavaVersion>
301                   <version>11</version>
302                 </requireJavaVersion>
303                 <requireMavenVersion>
304                   <version>[3.5.0,)</version>
305                 </requireMavenVersion>
306               </rules>
307             </configuration>
308             <goals>
309               <goal>enforce</goal>
310             </goals>
311           </execution>
312         </executions>
313       </plugin>
314       <plugin>
315         <groupId>pl.project13.maven</groupId>
316         <artifactId>git-commit-id-plugin</artifactId>
317         <version>2.2.6</version>
318         <executions>
319           <execution>
320             <id>get-git-infos</id>
321             <goals>
322               <goal>revision</goal>
323             </goals>
324           </execution>
325         </executions>
326         <configuration>
327           <failOnNoGitDirectory>false</failOnNoGitDirectory>
328           <generateGitPropertiesFile>true</generateGitPropertiesFile>
329           <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
330           <gitDescribe>
331             <skip>false</skip>
332             <always>true</always>
333             <tags>true</tags>
334           </gitDescribe>
335         </configuration>
336       </plugin>
337     </plugins>
338   </build>
339
340   <profiles>
341     <profile>
342       <id>ide</id>
343       <activation>
344         <property>
345           <name>m2e.version</name>
346         </property>
347       </activation>
348       <build>
349         <!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
350         <directory>target-ide</directory>
351       </build>
352     </profile>
353     <profile>
354         <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
355              q = http://memory-alpha.wikia.com/wiki/Q ;)
356
357              The Quick profile is used during incremental local development, when you want to "just get that JAR built",
358              which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
359              tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
360              which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
361
362              Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
363              while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
364              from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
365           -->
366       <id>q</id>
367       <properties>
368         <skipTests>true</skipTests>
369             <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
370                  and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
371                  particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
372         <skipIT>true</skipIT>
373         <skipITs>true</skipITs>
374         <skip.karaf.featureTest>true</skip.karaf.featureTest>
375         <jacoco.skip>true</jacoco.skip>
376         <maven.javadoc.skip>true</maven.javadoc.skip>
377         <maven.source.skip>true</maven.source.skip>
378         <checkstyle.skip>true</checkstyle.skip>
379         <spotbugs.skip>true</spotbugs.skip>
380         <pmd.skip>true</pmd.skip>
381         <cpd.skip>true</cpd.skip>
382         <maven.site.skip>true</maven.site.skip>
383         <invoker.skip>true</invoker.skip>
384         <enforcer.skip>true</enforcer.skip>
385         <duplicate-finder.skip>true</duplicate-finder.skip>
386         <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
387         <maven.gitcommitid.skip>true</maven.gitcommitid.skip>
388         <modernizer.skip>true</modernizer.skip>
389       </properties>
390     </profile>
391     <profile>
392       <!-- http://blog2.vorburger.ch/2016/06/maven-install-into-additional.html
393            mvn [-o -Pq] install -DaddInstallRepositoryPath=.../karaf/system is used in development to directly
394            install artifacts such as bundles and KARs not just into the global shared ~/.m2/repository
395            but also into the isolated Maven repo of a Karaf distribution.
396        -->
397       <activation>
398         <property>
399           <name>addInstallRepositoryPath</name>
400         </property>
401       </activation>
402       <build>
403         <plugins>
404           <plugin>
405             <artifactId>maven-install-plugin</artifactId>
406             <executions>
407               <execution>
408                 <id>additional-install</id>
409                 <phase>install</phase>
410                 <goals>
411                   <goal>install-file</goal>
412                 </goals>
413                 <configuration>
414                   <file>${project.build.directory}/${project.build.finalName}.jar</file>
415                   <localRepositoryPath>${addInstallRepositoryPath}</localRepositoryPath>
416                 </configuration>
417               </execution>
418             </executions>
419           </plugin>
420         </plugins>
421       </build>
422     </profile>
423     <profile>
424       <!--
425           This profile is to ensure we only build javadocs reports
426           when we plan to deploy Maven site for our project.
427
428           It activates by checking for the existance of deploy-site.xml in the
429           user's current working directory. (Intent is that this is run from
430           the Project root directory)
431       -->
432       <id>maven-site</id>
433       <activation>
434         <file>
435           <exists>${user.dir}/deploy-site.xml</exists>
436         </file>
437       </activation>
438
439       <build>
440         <plugins>
441           <plugin>
442             <artifactId>maven-site-plugin</artifactId>
443
444             <executions>
445               <execution>
446                 <id>generate-site</id>
447                 <phase>install</phase>
448                 <goals>
449                   <goal>site</goal>
450                   <goal>attach-descriptor</goal>
451                 </goals>
452               </execution>
453             </executions>
454           </plugin>
455         </plugins>
456       </build>
457
458       <reporting>
459         <plugins>
460           <plugin>
461             <artifactId>maven-project-info-reports-plugin</artifactId>
462             <configuration>
463               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
464             </configuration>
465             <reportSets>
466               <reportSet>
467                 <reports>
468                   <report>index</report>
469                 </reports>
470               </reportSet>
471             </reportSets>
472           </plugin>
473           <plugin>
474             <artifactId>maven-javadoc-plugin</artifactId>
475             <reportSets>
476               <reportSet>
477                 <reports>
478                   <report>javadoc-no-fork</report>
479                   <report>test-javadoc-no-fork</report>
480                 </reports>
481               </reportSet>
482             </reportSets>
483           </plugin>
484         </plugins>
485       </reporting>
486     </profile>
487     <profile>
488       <!-- Javadocs with links -->
489       <id>javadoc-links</id>
490         <activation>
491           <file>
492             <exists>odl-javadoc-links-optin</exists>
493           </file>
494         </activation>
495       <build>
496         <plugins>
497           <plugin>
498             <artifactId>maven-javadoc-plugin</artifactId>
499             <configuration combine.children="append">
500               <links>
501                 <link>https://junit.org/junit4/javadoc/4.11/</link>
502                 <link>http://hamcrest.org/JavaHamcrest/javadoc/2.1/</link>
503                 <link>http://google.github.io/truth/api/0.43/</link>
504                 <link>https://www.slf4j.org/apidocs/</link>
505                 <link>https://xerces.apache.org/xerces2-j/javadocs/api/</link>
506                 <link>https://google.github.io/guava/releases/27.1-jre/api/docs/</link>
507                 <link>http://doc.akka.io/japi/akka/2.5.24/</link>
508                 <link>http://netty.io/4.1/api/</link>
509                 <link>https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/</link>
510                 <link>https://commons.apache.org/proper/commons-lang/javadocs/api-3.9/</link>
511                 <link>https://commons.apache.org/proper/commons-codec/apidocs/</link>
512               </links>
513             </configuration>
514           </plugin>
515         </plugins>
516       </build>
517     </profile>
518
519     <profile>
520       <!-- On JDK9-and-later specify html4 javadoc, if requested-->
521       <id>jdk9-javadoc</id>
522       <activation>
523         <jdk>[9,)</jdk>
524         <file>
525           <exists>odl-javadoc-html5-optout</exists>
526         </file>
527       </activation>
528       <build>
529         <plugins>
530           <plugin>
531             <artifactId>maven-javadoc-plugin</artifactId>
532             <configuration combine.children="append">
533               <additionalOptions>
534                 <additionalOption>-html4</additionalOption>
535               </additionalOptions>
536             </configuration>
537           </plugin>
538         </plugins>
539       </build>
540     </profile>
541
542     <profile>
543       <!-- Disable plugins which are not useful for sonar -->
544       <id>sonar-only</id>
545       <activation>
546         <property>
547           <name>sonar</name>
548         </property>
549       </activation>
550       <properties>
551         <checkstyle.skip>true</checkstyle.skip>
552         <duplicate-finder.skip>true</duplicate-finder.skip>
553         <skip.karaf.featureTest>true</skip.karaf.featureTest>
554         <maven.javadoc.skip>true</maven.javadoc.skip>
555         <maven.source.skip>true</maven.source.skip>
556       </properties>
557     </profile>
558   </profiles>
559
560   <distributionManagement>
561     <repository>
562       <id>opendaylight-release</id>
563       <url>${nexusproxy}/repositories/opendaylight.release/</url>
564     </repository>
565     <snapshotRepository>
566       <id>opendaylight-snapshot</id>
567       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
568     </snapshotRepository>
569     <site>
570       <id>opendaylight-site</id>
571       <url>${nexus.site.url}/${project.artifactId}/</url>
572     </site>
573   </distributionManagement>
574 </project>