Start 3.0.1-SNAPSHOT
[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>3.0.1-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>Bugzilla</system>
46     <url>https://bugs.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 property is used in the pluginManagement and the q profile as well as -D set e.g. in releng/builder by c/53426
79          to emulate a future "maven.gitcommitid.skip", which only a future not-yet-available-on-Maven-central maven-git-commit-id-plugin release has.
80          (If we ever upgrade the version of the maven-git-commit-id-plugin we use, then this and re. pluginManagement config could be removed; BUT then
81           the q profile and all -D in releng/builder etc. else would have to be changed from this "gitid.skip" to "maven.gitcommitid.skip.)
82       -->
83     <gitid.skip>false</gitid.skip>
84
85     <!-- This version property instead of just direct version in pluginManagement is the exception that confirms the rule
86          and is required so that downstream users of the archetype-packaging extension can use this (and get the same version
87          as the maven-archetype-plugin), because there is no "extensionManagement" in Maven -->
88     <maven.archetype.plugin.version>3.0.1</maven.archetype.plugin.version>
89   </properties>
90
91   <build>
92     <pluginManagement>
93       <plugins>
94         <plugin>
95           <artifactId>maven-archetype-plugin</artifactId>
96           <version>${maven.archetype.plugin.version}</version>
97         </plugin>
98         <plugin>
99           <artifactId>maven-clean-plugin</artifactId>
100           <version>3.0.0</version>
101         </plugin>
102         <plugin>
103           <artifactId>maven-dependency-plugin</artifactId>
104           <version>3.0.2</version>
105         </plugin>
106         <plugin>
107           <artifactId>maven-deploy-plugin</artifactId>
108           <version>2.8.2</version>
109         </plugin>
110         <plugin>
111           <artifactId>maven-help-plugin</artifactId>
112           <version>2.2</version>
113         </plugin>
114         <plugin>
115           <artifactId>maven-install-plugin</artifactId>
116           <version>2.5.2</version>
117         </plugin>
118         <plugin>
119           <artifactId>maven-javadoc-plugin</artifactId>
120           <version>3.0.0-M1</version>
121           <configuration>
122             <!-- Keep things quiet except for warnings/errors -->
123             <quiet>true</quiet>
124             <tags>
125               <!-- support for HelpMojo generated by the maven-plugin-plugin -->
126               <tag>
127                 <name>goal</name>
128                 <placement>t</placement>
129                 <head>Goal:</head>
130               </tag>
131               <tag>
132                 <name>requiresProject</name>
133                 <placement>t</placement>
134                 <head>Requires project:</head>
135               </tag>
136               <tag>
137                 <name>threadSafe</name>
138                 <placement>t</placement>
139                 <head>Threadsafe</head>
140               </tag>
141               <tag>
142                 <name>phase</name>
143                 <placement>t</placement>
144                 <head>Phase:</head>
145               </tag>
146               <!-- end HelpMojo support -->
147             </tags>
148             <detectLinks>false</detectLinks> <!-- TODO: It should work once https://issues.apache.org/jira/browse/MJAVADOC-427 is solved -->
149             <detectOfflineLinks>true</detectOfflineLinks>
150             <links>
151               <link>http://www.atetric.com/atetric/javadoc/junit/junit/4.11/</link>
152               <link>http://hamcrest.org/JavaHamcrest/javadoc/1.3/</link>
153               <link>http://google.github.io/truth/api/0.28/</link>
154               <link>https://www.slf4j.org/apidocs/</link>
155               <link>https://xerces.apache.org/xerces2-j/javadocs/api/</link>
156               <link>https://google.github.io/guava/releases/23.3-jre/api/docs/</link>
157               <link>http://doc.akka.io/japi/akka/2.5.3/</link>
158               <link>http://netty.io/4.1/api/</link>
159               <link>https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/</link>
160               <link>https://commons.apache.org/proper/commons-lang/javadocs/api-3.6/</link>
161               <link>https://commons.apache.org/proper/commons-codec/apidocs/</link>
162             </links>
163           </configuration>
164           <executions>
165             <execution>
166               <id>attach-javadocs</id>
167               <goals>
168                 <goal>jar</goal>
169               </goals>
170             </execution>
171           </executions>
172         </plugin>
173         <plugin>
174           <artifactId>maven-project-info-reports-plugin</artifactId>
175           <version>2.9</version>
176         </plugin>
177         <plugin>
178           <artifactId>maven-release-plugin</artifactId>
179           <version>2.5.3</version>
180         </plugin>
181         <plugin>
182           <artifactId>maven-site-plugin</artifactId>
183           <version>3.6</version>
184           <configuration>
185             <asciidoc>
186               <attributes>
187                 <imagesdir>./images</imagesdir>
188                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
189                 <icons>font</icons>
190                 <source-highlighter>coderay</source-highlighter>
191                 <coderay-css>style</coderay-css>
192               </attributes>
193               <requires>
194                 <require>asciidoctor-diagram</require>
195               </requires>
196             </asciidoc>
197           </configuration>
198           <dependencies>
199             <dependency>
200               <!-- Downgrade Velocity; the Asciidoctor templates don't work with Velocity 1.7 -->
201               <!-- See https://maven.apache.org/plugins/maven-site-plugin/migrate.html -->
202               <groupId>org.apache.velocity</groupId>
203               <artifactId>velocity</artifactId>
204               <version>1.5</version>
205             </dependency>
206             <dependency>
207               <groupId>org.apache.maven.doxia</groupId>
208               <artifactId>doxia-core</artifactId>
209               <version>1.7</version>
210             </dependency>
211             <dependency>
212               <groupId>org.asciidoctor</groupId>
213               <artifactId>asciidoctor-maven-plugin</artifactId>
214               <version>1.5.3</version>
215             </dependency>
216             <dependency>
217               <groupId>org.asciidoctor</groupId>
218               <artifactId>asciidoctorj-diagram</artifactId>
219               <version>1.3.1</version>
220             </dependency>
221
222             <!-- Needed for JDK-9 compatibility -->
223             <dependency>
224               <groupId>commons-lang</groupId>
225               <artifactId>commons-lang</artifactId>
226               <version>2.6</version>
227             </dependency>
228           </dependencies>
229         </plugin>
230         <plugin>
231           <groupId>org.codehaus.mojo</groupId>
232           <artifactId>exec-maven-plugin</artifactId>
233           <version>1.5.0</version>
234         </plugin>
235         <plugin>
236           <groupId>org.codehaus.mojo</groupId>
237           <artifactId>jdepend-maven-plugin</artifactId>
238           <version>2.0</version>
239           <executions>
240             <execution>
241               <phase>site</phase>
242               <goals>
243                 <goal>generate-no-fork</goal>
244               </goals>
245             </execution>
246           </executions>
247         </plugin>
248         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
249         <plugin>
250           <groupId>org.eclipse.m2e</groupId>
251           <artifactId>lifecycle-mapping</artifactId>
252           <version>1.0.0</version>
253           <configuration>
254             <lifecycleMappingMetadata>
255               <pluginExecutions>
256                 <pluginExecution>
257                   <pluginExecutionFilter>
258                     <groupId>pl.project13.maven</groupId>
259                     <artifactId>git-commit-id-plugin</artifactId>
260                     <versionRange>[1,)</versionRange>
261                     <goals>
262                       <goal>revision</goal>
263                     </goals>
264                   </pluginExecutionFilter>
265                   <action>
266                     <ignore></ignore>
267                   </action>
268                 </pluginExecution>
269                 <pluginExecution>
270                   <pluginExecutionFilter>
271                     <groupId>org.apache.maven.plugins</groupId>
272                     <artifactId>maven-dependency-plugin</artifactId>
273                     <versionRange>[2.10,)</versionRange>
274                     <goals>
275                       <goal>unpack</goal>
276                     </goals>
277                   </pluginExecutionFilter>
278                   <action>
279                     <ignore></ignore>
280                   </action>
281                 </pluginExecution>
282                 <pluginExecution>
283                   <pluginExecutionFilter>
284                     <groupId>org.apache.maven.plugins</groupId>
285                     <artifactId>maven-enforcer-plugin</artifactId>
286                     <versionRange>[1.0.0,)</versionRange>
287                     <goals>
288                       <goal>enforce</goal>
289                     </goals>
290                   </pluginExecutionFilter>
291                   <action>
292                     <ignore />
293                   </action>
294                 </pluginExecution>
295               </pluginExecutions>
296             </lifecycleMappingMetadata>
297           </configuration>
298         </plugin>
299       </plugins>
300     </pluginManagement>
301
302     <plugins>
303       <plugin>
304         <artifactId>maven-enforcer-plugin</artifactId>
305         <version>1.4.1</version>
306         <executions>
307           <execution>
308             <id>enforce-maven</id>
309             <configuration>
310               <rules>
311                 <requireJavaVersion>
312                   <version>1.8.0</version>
313                 </requireJavaVersion>
314                 <requireMavenVersion>
315                   <version>[3.3.9,)</version>
316                 </requireMavenVersion>
317               </rules>
318             </configuration>
319             <goals>
320               <goal>enforce</goal>
321             </goals>
322           </execution>
323         </executions>
324       </plugin>
325       <plugin>
326         <groupId>pl.project13.maven</groupId>
327         <artifactId>git-commit-id-plugin</artifactId>
328         <version>2.2.2</version>
329         <executions>
330           <execution>
331             <id>get-git-infos</id>
332             <goals>
333               <goal>revision</goal>
334             </goals>
335           </execution>
336         </executions>
337         <configuration>
338           <skip>${gitid.skip}</skip>
339           <failOnNoGitDirectory>false</failOnNoGitDirectory>
340           <generateGitPropertiesFile>true</generateGitPropertiesFile>
341           <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
342           <gitDescribe>
343             <skip>false</skip>
344             <always>true</always>
345             <tags>true</tags>
346           </gitDescribe>
347         </configuration>
348       </plugin>
349     </plugins>
350   </build>
351
352   <profiles>
353     <profile>
354       <id>ide</id>
355       <activation>
356         <property>
357           <name>m2e.version</name>
358         </property>
359       </activation>
360       <build>
361         <!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
362         <directory>target-ide</directory>
363       </build>
364     </profile>
365     <profile>
366         <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
367              q = http://memory-alpha.wikia.com/wiki/Q ;)
368
369              The Quick profile is used during incremental local development, when you want to "just get that JAR built",
370              which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
371              tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
372              which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
373
374              Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
375              while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
376              from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
377           -->
378       <id>q</id>
379       <properties>
380         <skipTests>true</skipTests>
381             <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
382                  and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
383                  particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
384         <skipIT>true</skipIT>
385         <skipITs>true</skipITs>
386         <skip.karaf.featureTest>true</skip.karaf.featureTest>
387         <jacoco.skip>true</jacoco.skip>
388         <maven.javadoc.skip>true</maven.javadoc.skip>
389         <maven.source.skip>true</maven.source.skip>
390         <checkstyle.skip>true</checkstyle.skip>
391         <findbugs.skip>true</findbugs.skip>
392         <pmd.skip>true</pmd.skip>
393         <cpd.skip>true</cpd.skip>
394         <maven.site.skip>true</maven.site.skip>
395         <invoker.skip>true</invoker.skip>
396         <enforcer.skip>true</enforcer.skip>
397         <duplicate-finder.skip>true</duplicate-finder.skip>
398         <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
399         <gitid.skip>true</gitid.skip>
400       </properties>
401     </profile>
402     <profile>
403       <!-- http://blog2.vorburger.ch/2016/06/maven-install-into-additional.html
404            mvn [-o -Pq] install -DaddInstallRepositoryPath=.../karaf/system is used in development to directly
405            install artifacts such as bundles and KARs not just into the global shared ~/.m2/repository
406            but also into the isolated Maven repo of a Karaf distribution.
407        -->
408       <activation>
409         <property>
410           <name>addInstallRepositoryPath</name>
411         </property>
412       </activation>
413       <build>
414         <plugins>
415           <plugin>
416             <artifactId>maven-install-plugin</artifactId>
417             <executions>
418               <execution>
419                 <id>additional-install</id>
420                 <phase>install</phase>
421                 <goals>
422                   <goal>install-file</goal>
423                 </goals>
424                 <configuration>
425                   <file>${project.build.directory}/${project.build.finalName}.jar</file>
426                   <localRepositoryPath>${addInstallRepositoryPath}</localRepositoryPath>
427                 </configuration>
428               </execution>
429             </executions>
430           </plugin>
431         </plugins>
432       </build>
433     </profile>
434     <profile>
435       <!--
436           This profile is to ensure we only build javadocs reports
437           when we plan to deploy Maven site for our project.
438
439           It activates by checking for the existance of deploy-site.xml in the
440           user's current working directory. (Intent is that this is run from
441           the Project root directory)
442       -->
443       <id>maven-site</id>
444       <activation>
445         <file>
446           <exists>${user.dir}/deploy-site.xml</exists>
447         </file>
448       </activation>
449
450       <build>
451         <plugins>
452           <plugin>
453             <artifactId>maven-site-plugin</artifactId>
454
455             <executions>
456               <execution>
457                 <id>generate-site</id>
458                 <phase>install</phase>
459                 <goals>
460                   <goal>site</goal>
461                   <goal>attach-descriptor</goal>
462                 </goals>
463               </execution>
464             </executions>
465           </plugin>
466         </plugins>
467       </build>
468
469       <reporting>
470         <plugins>
471           <plugin>
472             <artifactId>maven-project-info-reports-plugin</artifactId>
473             <configuration>
474               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
475             </configuration>
476             <reportSets>
477               <reportSet>
478                 <reports>
479                   <report>index</report>
480                 </reports>
481               </reportSet>
482             </reportSets>
483           </plugin>
484           <plugin>
485             <artifactId>maven-javadoc-plugin</artifactId>
486             <reportSets>
487               <reportSet>
488                 <reports>
489                   <report>javadoc-no-fork</report>
490                   <report>test-javadoc-no-fork</report>
491                 </reports>
492               </reportSet>
493             </reportSets>
494           </plugin>
495         </plugins>
496       </reporting>
497     </profile>
498   </profiles>
499
500   <distributionManagement>
501     <repository>
502       <id>opendaylight-release</id>
503       <url>${nexusproxy}/repositories/opendaylight.release/</url>
504     </repository>
505     <snapshotRepository>
506       <id>opendaylight-snapshot</id>
507       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
508     </snapshotRepository>
509     <site>
510       <id>opendaylight-site</id>
511       <url>${nexus.site.url}/${project.artifactId}/</url>
512     </site>
513   </distributionManagement>
514 </project>