Checkstyle: no space inside parentheses
[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" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
11   <modelVersion>4.0.0</modelVersion>
12
13   <!--
14       Note: This parent is not meant to be used by code artifacts. Please use
15             odlparent instead.
16   -->
17
18   <groupId>org.opendaylight.odlparent</groupId>
19   <artifactId>odlparent-lite</artifactId>
20   <version>1.8.0-SNAPSHOT</version>
21   <packaging>pom</packaging>
22   <name>ODL :: odlparent :: ${project.artifactId}</name>
23
24   <!-- Sufficient Metadata for Maven Central Repository deployment
25        These are default, some of which project inheriting from this POM may override (but don't have to, typically)
26        see http://central.sonatype.org/pages/requirements.html
27    -->
28   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
29   <description>OpenDaylight is leading the transformation to Open Software Defined Networking (SDN). For more information, please see https://www.opendaylight.org</description>
30
31   <licenses>
32     <license>
33       <name>Eclipse Public License v1.0</name>
34       <url>https://www.eclipse.org/legal/epl-v10.html</url>
35     </license>
36   </licenses>
37
38   <organization>
39     <name>OpenDaylight</name>
40     <url>https://www.opendaylight.org</url>
41   </organization>
42
43   <issueManagement>
44     <system>Bugzilla</system>
45     <url>https://bugs.opendaylight.org/</url>
46   </issueManagement>
47
48   <ciManagement>
49     <system>Jenkins</system>
50     <url>https://jenkins.opendaylight.org/releng/</url>
51   </ciManagement>
52
53   <scm>
54     <url>https://git.opendaylight.org/gerrit/</url>
55   </scm>
56
57   <developers>
58     <developer>
59       <id>*</id>
60       <name>Please consult the PROJECT_INFO.yaml, README* and/or CONTRIBUTORS which should be included with this JAR</name>
61       <url>https://www.opendaylight.org</url>
62       <email>helpdesk@opendaylight.org</email>
63     </developer>
64   </developers>
65
66   <prerequisites>
67     <!-- This is only used to prevent building with Maven < 3 and to appease
68          maven-dependency-plugin; our real Maven requirement is enforced by
69          the enforcer plugin. -->
70     <maven>3.0.5</maven>
71   </prerequisites>
72
73   <properties>
74     <nexusproxy>https://nexus.opendaylight.org/content</nexusproxy>
75
76     <!-- Variables required for Maven Site generation -->
77     <nexus.site.url>file:${user.dir}/target/staged-site</nexus.site.url>
78     <odl.site.url>https://nexus.opendaylight.org/content/sites/site/</odl.site.url>
79     <stream>latest</stream><!-- CI should pass in -Dstream={stream} -->
80
81     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
82     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
83   </properties>
84
85   <build>
86     <pluginManagement>
87       <plugins>
88         <plugin>
89           <artifactId>maven-clean-plugin</artifactId>
90           <version>3.0.0</version>
91         </plugin>
92         <plugin>
93           <artifactId>maven-deploy-plugin</artifactId>
94           <version>2.8.2</version>
95         </plugin>
96         <plugin>
97           <artifactId>maven-help-plugin</artifactId>
98           <version>2.2</version>
99         </plugin>
100         <plugin>
101           <artifactId>maven-install-plugin</artifactId>
102           <version>2.5.2</version>
103         </plugin>
104         <plugin>
105           <artifactId>maven-javadoc-plugin</artifactId>
106           <version>2.10.4</version>
107           <configuration>
108             <!-- Keep things quiet except for warnings/errors -->
109             <quiet>true</quiet>
110             <tags>
111               <!-- support for HelpMojo generated by the maven-plugin-plugin -->
112               <tag>
113                 <name>goal</name>
114                 <placement>t</placement>
115                 <head>Goal:</head>
116               </tag>
117               <tag>
118                 <name>requiresProject</name>
119                 <placement>t</placement>
120                 <head>Requires project:</head>
121               </tag>
122               <tag>
123                 <name>threadSafe</name>
124                 <placement>t</placement>
125                 <head>Threadsafe</head>
126               </tag>
127               <tag>
128                 <name>phase</name>
129                 <placement>t</placement>
130                 <head>Phase:</head>
131               </tag>
132               <!-- end HelpMojo support -->
133             </tags>
134           </configuration>
135           <executions>
136             <execution>
137               <id>attach-javadocs</id>
138               <goals>
139                 <goal>jar</goal>
140               </goals>
141             </execution>
142           </executions>
143         </plugin>
144         <plugin>
145           <artifactId>maven-project-info-reports-plugin</artifactId>
146           <version>2.9</version>
147         </plugin>
148         <plugin>
149           <artifactId>maven-release-plugin</artifactId>
150           <version>2.5.3</version>
151         </plugin>
152         <plugin>
153           <artifactId>maven-site-plugin</artifactId>
154           <version>3.6</version>
155           <configuration>
156             <asciidoc>
157               <attributes>
158                 <imagesdir>./images</imagesdir>
159                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
160                 <icons>font</icons>
161                 <source-highlighter>coderay</source-highlighter>
162                 <coderay-css>style</coderay-css>
163               </attributes>
164               <requires>
165                 <require>asciidoctor-diagram</require>
166               </requires>
167             </asciidoc>
168           </configuration>
169           <dependencies>
170             <dependency>
171               <!-- Downgrade Velocity; the Asciidoctor templates don't work with Velocity 1.7 -->
172               <!-- See https://maven.apache.org/plugins/maven-site-plugin/migrate.html -->
173               <groupId>org.apache.velocity</groupId>
174               <artifactId>velocity</artifactId>
175               <version>1.5</version>
176             </dependency>
177             <dependency>
178               <groupId>org.apache.maven.doxia</groupId>
179               <artifactId>doxia-core</artifactId>
180               <version>1.7</version>
181             </dependency>
182             <dependency>
183               <groupId>org.asciidoctor</groupId>
184               <artifactId>asciidoctor-maven-plugin</artifactId>
185               <version>1.5.3</version>
186             </dependency>
187             <dependency>
188               <groupId>org.asciidoctor</groupId>
189               <artifactId>asciidoctorj-diagram</artifactId>
190               <version>1.3.1</version>
191             </dependency>
192
193             <!-- Needed for JDK-9 compatibility -->
194             <dependency>
195               <groupId>commons-lang</groupId>
196               <artifactId>commons-lang</artifactId>
197               <version>2.6</version>
198             </dependency>
199           </dependencies>
200         </plugin>
201         <plugin>
202           <groupId>org.codehaus.mojo</groupId>
203           <artifactId>exec-maven-plugin</artifactId>
204           <version>1.5.0</version>
205         </plugin>
206         <plugin>
207           <groupId>org.codehaus.mojo</groupId>
208           <artifactId>jdepend-maven-plugin</artifactId>
209           <version>2.0</version>
210           <executions>
211             <execution>
212               <phase>site</phase>
213               <goals>
214                 <goal>generate-no-fork</goal>
215               </goals>
216             </execution>
217           </executions>
218         </plugin>
219         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
220         <plugin>
221           <groupId>org.eclipse.m2e</groupId>
222           <artifactId>lifecycle-mapping</artifactId>
223           <version>1.0.0</version>
224           <configuration>
225             <lifecycleMappingMetadata>
226               <pluginExecutions>
227                 <pluginExecution>
228                   <pluginExecutionFilter>
229                     <groupId>pl.project13.maven</groupId>
230                     <artifactId>git-commit-id-plugin</artifactId>
231                     <versionRange>[1,)</versionRange>
232                     <goals>
233                       <goal>revision</goal>
234                     </goals>
235                   </pluginExecutionFilter>
236                   <action>
237                     <ignore></ignore>
238                   </action>
239                 </pluginExecution>
240                 <pluginExecution>
241                   <pluginExecutionFilter>
242                     <groupId>org.apache.maven.plugins</groupId>
243                     <artifactId>maven-dependency-plugin</artifactId>
244                     <versionRange>[2.10,)</versionRange>
245                     <goals>
246                       <goal>unpack</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-enforcer-plugin</artifactId>
257                     <versionRange>[1.0.0,)</versionRange>
258                     <goals>
259                       <goal>enforce</goal>
260                     </goals>
261                   </pluginExecutionFilter>
262                   <action>
263                     <ignore/>
264                   </action>
265                 </pluginExecution>
266               </pluginExecutions>
267             </lifecycleMappingMetadata>
268           </configuration>
269         </plugin>
270       </plugins>
271     </pluginManagement>
272
273     <plugins>
274       <plugin>
275         <artifactId>maven-enforcer-plugin</artifactId>
276         <version>1.4.1</version>
277         <executions>
278           <execution>
279             <id>enforce-maven</id>
280             <configuration>
281               <rules>
282                 <requireJavaVersion>
283                   <version>1.8.0</version>
284                 </requireJavaVersion>
285                 <requireMavenVersion>
286                   <version>[3.3.9,)</version>
287                 </requireMavenVersion>
288               </rules>
289             </configuration>
290             <goals>
291               <goal>enforce</goal>
292             </goals>
293           </execution>
294         </executions>
295       </plugin>
296       <plugin>
297         <groupId>pl.project13.maven</groupId>
298         <artifactId>git-commit-id-plugin</artifactId>
299         <version>2.2.1</version>
300         <executions>
301           <execution>
302             <id>get-git-infos</id>
303             <goals>
304               <goal>revision</goal>
305             </goals>
306           </execution>
307         </executions>
308         <configuration>
309           <failOnNoGitDirectory>false</failOnNoGitDirectory>
310           <generateGitPropertiesFile>true</generateGitPropertiesFile>
311           <generateGitPropertiesFilename>${project.build.outputDirectory}/META-INF/git.properties</generateGitPropertiesFilename>
312           <gitDescribe>
313             <skip>false</skip>
314             <always>true</always>
315             <tags>true</tags>
316           </gitDescribe>
317         </configuration>
318       </plugin>
319     </plugins>
320   </build>
321
322   <profiles>
323     <profile>
324       <id>ide</id>
325       <activation>
326         <property>
327           <name>m2e.version</name>
328         </property>
329       </activation>
330       <build>
331         <!-- Put the IDE's build output in a folder other than target, so that IDE builds don't interact with Maven builds -->
332         <directory>target-ide</directory>
333       </build>
334     </profile>
335     <profile>
336         <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
337              q = http://memory-alpha.wikia.com/wiki/Q ;)
338
339              The Quick profile is used during incremental local development, when you want to "just get that JAR built",
340              which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
341              tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
342              which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
343
344              Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
345              while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
346              from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
347           -->
348         <id>q</id>
349         <properties>
350             <skipTests>true</skipTests>
351             <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
352                  and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
353                  particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
354             <skipIT>true</skipIT>
355             <skipITs>true</skipITs>
356             <skip.karaf.featureTest>true</skip.karaf.featureTest>
357             <jacoco.skip>true</jacoco.skip>
358             <maven.javadoc.skip>true</maven.javadoc.skip>
359             <maven.source.skip>true</maven.source.skip>
360             <checkstyle.skip>true</checkstyle.skip>
361             <findbugs.skip>true</findbugs.skip>
362             <pmd.skip>true</pmd.skip>
363             <cpd.skip>true</cpd.skip>
364             <maven.site.skip>true</maven.site.skip>
365             <invoker.skip>true</invoker.skip>
366             <enforcer.skip>true</enforcer.skip>
367             <mdsal.skip.verbose>true</mdsal.skip.verbose> <!-- Bug 6236 -->
368         </properties>
369         <build>
370           <plugins>
371             <plugin>
372               <groupId>pl.project13.maven</groupId>
373               <artifactId>git-commit-id-plugin</artifactId>
374               <configuration>
375                 <skip>true</skip>
376               </configuration>
377             </plugin>
378           </plugins>
379         </build>
380     </profile>
381     <profile>
382       <!-- http://blog2.vorburger.ch/2016/06/maven-install-into-additional.html
383            mvn [-o -Pq] install -DaddInstallRepositoryPath=.../karaf/system is used in development to directly
384            install artifacts such as bundles and KARs not just into the global shared ~/.m2/repository
385            but also into the isolated Maven repo of a Karaf distribution.
386        -->
387       <activation>
388         <property>
389           <name>addInstallRepositoryPath</name>
390         </property>
391       </activation>
392       <build>
393         <plugins>
394           <plugin>
395             <artifactId>maven-install-plugin</artifactId>
396             <executions>
397               <execution>
398                 <id>additional-install</id>
399                 <phase>install</phase>
400                 <goals>
401                   <goal>install-file</goal>
402                 </goals>
403                 <configuration>
404                   <file>${project.build.directory}/${project.build.finalName}.jar</file>
405                   <localRepositoryPath>${addInstallRepositoryPath}</localRepositoryPath>
406                 </configuration>
407               </execution>
408             </executions>
409           </plugin>
410         </plugins>
411       </build>
412     </profile>
413     <profile>
414       <!--
415           This profile is to ensure we only build javadocs reports
416           when we plan to deploy Maven site for our project.
417
418           It activates by checking for the existance of deploy-site.xml in the
419           user's current working directory. (Intent is that this is run from
420           the Project root directory)
421       -->
422       <id>maven-site</id>
423       <activation>
424         <file>
425           <exists>${user.dir}/deploy-site.xml</exists>
426         </file>
427       </activation>
428
429       <build>
430         <plugins>
431           <plugin>
432             <artifactId>maven-site-plugin</artifactId>
433
434             <executions>
435               <execution>
436                 <id>generate-site</id>
437                 <phase>install</phase>
438                 <goals>
439                   <goal>site</goal>
440                   <goal>attach-descriptor</goal>
441                 </goals>
442               </execution>
443             </executions>
444           </plugin>
445         </plugins>
446       </build>
447
448       <reporting>
449         <plugins>
450           <plugin>
451             <artifactId>maven-project-info-reports-plugin</artifactId>
452             <configuration>
453               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
454             </configuration>
455             <reportSets>
456               <reportSet>
457                 <reports>
458                   <report>index</report>
459                 </reports>
460               </reportSet>
461             </reportSets>
462           </plugin>
463           <plugin>
464             <artifactId>maven-javadoc-plugin</artifactId>
465             <reportSets>
466               <reportSet>
467                 <reports>
468                   <report>javadoc-no-fork</report>
469                   <report>test-javadoc-no-fork</report>
470                 </reports>
471               </reportSet>
472             </reportSets>
473           </plugin>
474         </plugins>
475       </reporting>
476     </profile>
477   </profiles>
478
479   <distributionManagement>
480     <repository>
481       <id>opendaylight-release</id>
482       <url>${nexusproxy}/repositories/opendaylight.release/</url>
483     </repository>
484     <snapshotRepository>
485       <id>opendaylight-snapshot</id>
486       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
487     </snapshotRepository>
488     <site>
489       <id>opendaylight-site</id>
490       <url>${nexus.site.url}/${project.artifactId}/</url>
491     </site>
492   </distributionManagement>
493 </project>