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