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