69b7589b866a4012684464c5459a6aa8a790dd40
[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.7.0-SNAPSHOT</version>
21   <packaging>pom</packaging>
22   <name>ODL :: odlparent :: ${project.artifactId}</name>
23
24   <licenses>
25     <license>
26       <name>Eclipse Public License v1.0</name>
27       <url>https://www.eclipse.org/legal/epl-v10.html</url>
28     </license>
29   </licenses>
30
31   <organization>
32     <name>OpenDaylight</name>
33     <url>https://www.opendaylight.org</url>
34   </organization>
35
36   <issueManagement>
37     <system>Bugzilla</system>
38     <url>https://bugs.opendaylight.org/</url>
39   </issueManagement>
40
41   <ciManagement>
42     <system>Jenkins</system>
43     <url>https://jenkins.opendaylight.org/releng/</url>
44   </ciManagement>
45
46   <prerequisites>
47     <!-- This is only used to prevent building with Maven < 3 and to appease
48          maven-dependency-plugin; our real Maven requirement is enforced by
49          the enforcer plugin. -->
50     <maven>3.0.5</maven>
51   </prerequisites>
52
53   <properties>
54     <nexusproxy>https://nexus.opendaylight.org/content</nexusproxy>
55
56     <!-- Variables required for Maven Site generation -->
57     <nexus.site.url>file:${user.dir}/target/staged-site</nexus.site.url>
58     <odl.site.url>https://nexus.opendaylight.org/content/sites/site/</odl.site.url>
59     <stream>latest</stream><!-- CI should pass in -Dstream={stream} -->
60
61     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
62     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
63   </properties>
64
65   <build>
66     <pluginManagement>
67       <plugins>
68         <plugin>
69           <artifactId>maven-clean-plugin</artifactId>
70           <version>3.0.0</version>
71         </plugin>
72         <plugin>
73           <artifactId>maven-deploy-plugin</artifactId>
74           <version>2.8.2</version>
75         </plugin>
76         <plugin>
77           <artifactId>maven-install-plugin</artifactId>
78           <version>2.5.2</version>
79         </plugin>
80         <plugin>
81           <artifactId>maven-javadoc-plugin</artifactId>
82           <version>2.10.3</version>
83           <configuration>
84             <!-- Keep things quiet except for warnings/errors -->
85             <quiet>true</quiet>
86             <tags>
87               <!-- support for HelpMojo generated by the maven-plugin-plugin -->
88               <tag>
89                 <name>goal</name>
90                 <placement>t</placement>
91                 <head>Goal:</head>
92               </tag>
93               <tag>
94                 <name>requiresProject</name>
95                 <placement>t</placement>
96                 <head>Requires project:</head>
97               </tag>
98               <tag>
99                 <name>threadSafe</name>
100                 <placement>t</placement>
101                 <head>Threadsafe</head>
102               </tag>
103               <tag>
104                 <name>phase</name>
105                 <placement>t</placement>
106                 <head>Phase:</head>
107               </tag>
108               <!-- end HelpMojo support -->
109             </tags>
110           </configuration>
111           <executions>
112             <execution>
113               <id>attach-javadocs</id>
114               <goals>
115                 <goal>jar</goal>
116               </goals>
117             </execution>
118           </executions>
119         </plugin>
120         <plugin>
121           <artifactId>maven-project-info-reports-plugin</artifactId>
122           <version>2.9</version>
123         </plugin>
124         <plugin>
125           <artifactId>maven-release-plugin</artifactId>
126           <version>2.5.3</version>
127         </plugin>
128         <plugin>
129           <artifactId>maven-site-plugin</artifactId>
130           <version>3.5.1</version>
131           <configuration>
132             <asciidoc>
133               <attributes>
134                 <imagesdir>./images</imagesdir>
135                 <imagesoutdir>${project.build.directory}/site/images</imagesoutdir>
136                 <icons>font</icons>
137                 <source-highlighter>coderay</source-highlighter>
138                 <coderay-css>style</coderay-css>
139               </attributes>
140               <requires>
141                 <require>asciidoctor-diagram</require>
142               </requires>
143             </asciidoc>
144           </configuration>
145           <dependencies>
146             <dependency>
147               <!-- Downgrade Velocity; the Asciidoctor templates don't work with Velocity 1.7 -->
148               <!-- See https://maven.apache.org/plugins/maven-site-plugin/migrate.html -->
149               <groupId>org.apache.velocity</groupId>
150               <artifactId>velocity</artifactId>
151               <version>1.5</version>
152             </dependency>
153             <dependency>
154               <groupId>org.apache.maven.doxia</groupId>
155               <artifactId>doxia-core</artifactId>
156               <version>1.7</version>
157             </dependency>
158             <dependency>
159               <groupId>org.asciidoctor</groupId>
160               <artifactId>asciidoctor-maven-plugin</artifactId>
161               <version>1.5.3</version>
162             </dependency>
163             <dependency>
164               <groupId>org.asciidoctor</groupId>
165               <artifactId>asciidoctorj-diagram</artifactId>
166               <version>1.3.1</version>
167             </dependency>
168           </dependencies>
169         </plugin>
170         <plugin>
171           <groupId>org.codehaus.mojo</groupId>
172           <artifactId>jdepend-maven-plugin</artifactId>
173           <version>2.0</version>
174           <executions>
175             <execution>
176               <phase>site</phase>
177               <goals>
178                 <goal>generate-no-fork</goal>
179               </goals>
180             </execution>
181           </executions>
182         </plugin>
183         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
184         <plugin>
185           <groupId>org.eclipse.m2e</groupId>
186           <artifactId>lifecycle-mapping</artifactId>
187           <version>1.0.0</version>
188           <configuration>
189             <lifecycleMappingMetadata>
190               <pluginExecutions>
191                 <pluginExecution>
192                   <pluginExecutionFilter>
193                     <groupId>org.apache.maven.plugins</groupId>
194                     <artifactId>maven-dependency-plugin</artifactId>
195                     <versionRange>[2.10,)</versionRange>
196                     <goals>
197                       <goal>unpack</goal>
198                     </goals>
199                   </pluginExecutionFilter>
200                   <action>
201                     <ignore></ignore>
202                   </action>
203                 </pluginExecution>
204               </pluginExecutions>
205             </lifecycleMappingMetadata>
206           </configuration>
207         </plugin>
208       </plugins>
209     </pluginManagement>
210   </build>
211
212   <profiles>
213     <profile>
214         <!-- http://blog2.vorburger.ch/2016/06/improve-maven-build-speed-with-q.html
215              q = http://memory-alpha.wikia.com/wiki/Q ;)
216
217              The Quick profile is used during incremental local development, when you want to "just get that JAR built",
218              which is very handy e.g. for fast hot reloading cycles in Karaf with bundle watch.  It (intentionally!) skips
219              tests, quality checks etc. which are great and useful to run before finally submitting changes to Gerrit, and
220              which all must run on Gerrit, but which are overhead during ongoing fast iterative local development.
221
222              Note that the idea here is that your IDE will already have run quality checks such as e.g. Checkstyle
223              while you typed the code anyway.  Similarly, if you wrote a test, you'll probably already have compiled and run it
224              from your IDE, so when you want the OSGi bundle JAR for Karaf, ASAP, you typically don't want all that to run again.
225           -->
226         <id>q</id>
227         <properties>
228             <skipTests>true</skipTests>
229             <!-- But NOT <maven.test.skip>true, as that's for compiling, not running, tests;
230                  and that's usually quick.  Skipping test compilation with -Pq with maven.test.skip would be
231                  particularly confusing when used in a project with maven-jar-plugin <goal>test-jar, so don't.)  -->
232             <skipIT>true</skipIT>
233             <skipITs>true</skipITs>
234             <skip.karaf.featureTest>true</skip.karaf.featureTest>
235             <jacoco.skip>true</jacoco.skip>
236             <maven.javadoc.skip>true</maven.javadoc.skip>
237             <maven.source.skip>true</maven.source.skip>
238             <checkstyle.skip>true</checkstyle.skip>
239             <findbugs.skip>true</findbugs.skip>
240             <pmd.skip>true</pmd.skip>
241             <cpd.skip>true</cpd.skip>
242             <maven.site.skip>true</maven.site.skip>
243             <invoker.skip>true</invoker.skip>
244             <enforcer.skip>true</enforcer.skip>
245         </properties>
246     </profile>
247     <profile>
248       <!-- http://blog2.vorburger.ch/2016/06/maven-install-into-additional.html
249            mvn [-o -Pq] install -DaddInstallRepositoryPath=.../karaf/system is used in development to directly
250            install artifacts such as bundles and KARs not just into the global shared ~/.m2/repository
251            but also into the isolated Maven repo of a Karaf distribution.
252        -->
253       <activation>
254         <property>
255           <name>addInstallRepositoryPath</name>
256         </property>
257       </activation>
258       <build>
259         <plugins>
260           <plugin>
261             <artifactId>maven-install-plugin</artifactId>
262             <executions>
263               <execution>
264                 <id>additional-install</id>
265                 <phase>install</phase>
266                 <goals>
267                   <goal>install-file</goal>
268                 </goals>
269                 <configuration>
270                   <file>${project.build.directory}/${project.build.finalName}.jar</file>
271                   <localRepositoryPath>${addInstallRepositoryPath}</localRepositoryPath>
272                 </configuration>
273               </execution>
274             </executions>
275           </plugin>
276         </plugins>
277       </build>
278     </profile>
279     <profile>
280       <!--
281           This profile is to ensure we only build javadocs reports
282           when we plan to deploy Maven site for our project.
283
284           It activates by checking for the existance of deploy-site.xml in the
285           user's current working directory. (Intent is that this is run from
286           the Project root directory)
287       -->
288       <id>maven-site</id>
289       <activation>
290         <file>
291           <exists>${user.dir}/deploy-site.xml</exists>
292         </file>
293       </activation>
294
295       <build>
296         <plugins>
297           <plugin>
298             <artifactId>maven-site-plugin</artifactId>
299
300             <executions>
301               <execution>
302                 <id>generate-site</id>
303                 <phase>install</phase>
304                 <goals>
305                   <goal>site</goal>
306                   <goal>attach-descriptor</goal>
307                 </goals>
308               </execution>
309             </executions>
310           </plugin>
311         </plugins>
312       </build>
313
314       <reporting>
315         <plugins>
316           <plugin>
317             <artifactId>maven-project-info-reports-plugin</artifactId>
318             <configuration>
319               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
320             </configuration>
321             <reportSets>
322               <reportSet>
323                 <reports>
324                   <report>index</report>
325                 </reports>
326               </reportSet>
327             </reportSets>
328           </plugin>
329           <plugin>
330             <artifactId>maven-javadoc-plugin</artifactId>
331             <reportSets>
332               <reportSet>
333                 <reports>
334                   <report>javadoc-no-fork</report>
335                   <report>test-javadoc-no-fork</report>
336                 </reports>
337               </reportSet>
338             </reportSets>
339           </plugin>
340         </plugins>
341       </reporting>
342     </profile>
343   </profiles>
344
345
346   <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
347
348   <distributionManagement>
349     <repository>
350       <id>opendaylight-release</id>
351       <url>${nexusproxy}/repositories/opendaylight.release/</url>
352     </repository>
353     <snapshotRepository>
354       <id>opendaylight-snapshot</id>
355       <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
356     </snapshotRepository>
357     <site>
358       <id>opendaylight-site</id>
359       <url>${nexus.site.url}/${project.artifactId}/</url>
360     </site>
361   </distributionManagement>
362 </project>