pom.xml revision 08f9d4e6
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright (c) 2016 Cisco and/or its affiliates.
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at:
8  ~
9  ~     http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19
20    <modelVersion>4.0.0</modelVersion>
21    <groupId>io.fd.honeycomb.common</groupId>
22    <artifactId>honeycomb-parent</artifactId>
23    <name>${project.artifactId}</name>
24    <version>1.17.01-SNAPSHOT</version>
25    <packaging>pom</packaging>
26    <prerequisites>
27        <maven>3.1.1</maven>
28    </prerequisites>
29
30    <properties>
31        <nexusproxy>http://nexus.fd.io/content</nexusproxy>
32        <odl.nexusproxy>https://nexus.opendaylight.org/content</odl.nexusproxy>
33
34        <!-- Default Sonar configuration -->
35        <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
36        <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
37        <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
38        <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
39        <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
40        <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**</sonar.exclusions>
41
42        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
43        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
44
45        <!-- ODL dependencies -->
46        <yangtools.version>1.0.0-Boron</yangtools.version>
47        <mdsal.version>2.1.0-Boron</mdsal.version>
48        <mdsal.controller.version>1.4.0-Boron</mdsal.controller.version>
49        <mdsalmodel.version>0.9.0-Boron</mdsalmodel.version>
50        <netconf.version>1.1.0-Boron</netconf.version>
51        <restconf.version>1.4.2-Boron-SR2</restconf.version>
52        <salGeneratorPath>target/generated-sources/mdsal-binding</salGeneratorPath>
53
54        <!-- dependencies -->
55        <junit.version>4.11</junit.version>
56        <mockito.version>2.2.9</mockito.version>
57        <hamcrest.version>1.3</hamcrest.version>
58        <guava.version>18.0</guava.version>
59
60        <!-- plugins -->
61        <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
62        <checkstyle.version>7.1.2</checkstyle.version>
63        <maven.javadoc.version>2.10.3</maven.javadoc.version>
64        <jacoco.version>0.7.2.201409121644</jacoco.version>
65        <enforcer.version>1.4</enforcer.version>
66        <maven.compile.plugin.version>3.5.1</maven.compile.plugin.version>
67        <maven.bundle.version>3.0.1</maven.bundle.version>
68
69        <!-- checkstyle -->
70        <checkstyle.header.file>APACHE_HEADER.txt</checkstyle.header.file>
71
72        <!-- site -->
73        <!-- skip location check = makes site exec faster -->
74        <dependency.locations.enabled>false</dependency.locations.enabled>
75        <project.info.report.version>2.9</project.info.report.version>
76        <maven.resources.version>3.0.1</maven.resources.version>
77        <maven.site.version>3.4</maven.site.version>
78        <!-- adoc -->
79        <asciidoctor.maven.plugin.version>1.5.3</asciidoctor.maven.plugin.version>
80        <asciidoctorj.diagram.version>1.3.1</asciidoctorj.diagram.version>
81
82        <!-- groovy -->
83        <maven.groovy.version>2.0</maven.groovy.version>
84        <groovy.version>2.4.7</groovy.version>
85        <groovy.eclipse.compiler.version>2.9.2-01</groovy.eclipse.compiler.version>
86        <groovy.eclipse.batch.version>2.4.3-01</groovy.eclipse.batch.version>
87
88        <docs.base.url>https://nexus.fd.io/content/sites/site</docs.base.url>
89        <docs.hc.folder>io/fd/honeycomb</docs.hc.folder>
90    </properties>
91
92    <organization>
93        <name>fd.io</name>
94        <url>https://fd.io</url>
95    </organization>
96
97    <licenses>
98        <license>
99            <name>Apache License, Version 2.0</name>
100            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
101        </license>
102    </licenses>
103
104    <issueManagement>
105        <system>JIRA</system>
106        <url>https://jira.fd.io/</url>
107    </issueManagement>
108
109    <ciManagement>
110        <system>Jenkins</system>
111        <url>https://jenkins.fd.io/</url>
112    </ciManagement>
113
114    <mailingLists>
115        <mailingList>
116            <name>HC dev</name>
117            <post>honeycomb-dev@fd.io</post>
118            <subscribe>https://lists.fd.io/mailman/listinfo/honeycomb-dev</subscribe>
119            <archive>https://lists.fd.io/pipermail/honeycomb-dev/</archive>
120        </mailingList>
121    </mailingLists>
122
123    <dependencyManagement>
124        <dependencies>
125            <!-- ODL -->
126            <dependency>
127                <groupId>org.opendaylight.yangtools</groupId>
128                <artifactId>yangtools-artifacts</artifactId>
129                <version>${yangtools.version}</version>
130                <type>pom</type>
131                <scope>import</scope>
132            </dependency>
133            <dependency>
134                <groupId>org.opendaylight.controller</groupId>
135                <artifactId>mdsal-artifacts</artifactId>
136                <version>${mdsal.controller.version}</version>
137                <type>pom</type>
138                <scope>import</scope>
139            </dependency>
140            <dependency>
141                <groupId>org.opendaylight.mdsal</groupId>
142                <artifactId>mdsal-artifacts</artifactId>
143                <version>${mdsal.version}</version>
144                <type>pom</type>
145                <scope>import</scope>
146            </dependency>
147            <dependency>
148                <groupId>org.opendaylight.netconf</groupId>
149                <artifactId>netconf-artifacts</artifactId>
150                <version>${netconf.version}</version>
151                <type>pom</type>
152                <scope>import</scope>
153            </dependency>
154            <dependency>
155                <groupId>org.opendaylight.netconf</groupId>
156                <artifactId>restconf-artifacts</artifactId>
157                <version>${restconf.version}</version>
158                <type>pom</type>
159                <scope>import</scope>
160            </dependency>
161            <dependency>
162                <groupId>org.opendaylight.mdsal.model</groupId>
163                <artifactId>mdsal-model-artifacts</artifactId>
164                <version>${mdsalmodel.version}</version>
165                <type>pom</type>
166                <scope>import</scope>
167            </dependency>
168
169            <!-- Utilities -->
170            <dependency>
171                <groupId>com.google.guava</groupId>
172                <artifactId>guava</artifactId>
173                <version>${guava.version}</version>
174            </dependency>
175
176            <!-- Testing Dependencies -->
177            <dependency>
178                <groupId>junit</groupId>
179                <artifactId>junit</artifactId>
180                <version>${junit.version}</version>
181                <scope>test</scope>
182            </dependency>
183            <!-- Dont use mockito-all, it has problematic dependency on harmcrest
184                More details here - https://github.com/mockito/mockito/issues/324-->
185            <dependency>
186                <groupId>org.mockito</groupId>
187                <artifactId>mockito-core</artifactId>
188                <version>${mockito.version}</version>
189                <scope>test</scope>
190            </dependency>
191            <dependency>
192                <groupId>org.hamcrest</groupId>
193                <artifactId>hamcrest-all</artifactId>
194                <version>${hamcrest.version}</version>
195                <scope>test</scope>
196            </dependency>
197        </dependencies>
198    </dependencyManagement>
199
200    <build>
201        <pluginManagement>
202            <plugins>
203                <!-- checkstyle -->
204                <plugin>
205                    <artifactId>maven-checkstyle-plugin</artifactId>
206                    <version>${checkstyle.plugin.version}</version>
207                    <configuration>
208                        <!--TODO HONEYCOMB-155 enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
209                        <failOnViolation>false</failOnViolation>
210                        <failsOnError>true</failsOnError>
211                        <consoleOutput>true</consoleOutput>
212                        <includeTestResources>true</includeTestResources>
213                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
214                        <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
215                        <excludes>**\/target\/,
216                            **\/bin\/,
217                            **\/target-ide\/,
218                            **\/src/main/yang-gen-config\/,
219                            org/opendaylight/yang/gen/**,
220                            **\/src/main/yang-gen-sal\/,
221                            **\/src/main/xtend-gen\/,
222                            **\/src/main/yang\/,
223                            **\/archetype-resources\/</excludes>
224                    </configuration>
225                    <executions>
226                        <!-- Override license check configuration to fit Honeycomb coding style-->
227                        <execution>
228                            <id>check-license</id>
229                            <goals>
230                                <goal>check</goal>
231                            </goals>
232                            <phase>process-sources</phase>
233                            <configuration>
234                                <configLocation>honeycomb-checkstyle-license.xml</configLocation>
235                                <outputFile>${project.build.directory}/checkstyle-license-result.xml</outputFile>
236                            </configuration>
237                        </execution>
238                        <!-- Add logging checks from yangtools -->
239                        <execution>
240                            <id>check-logging</id>
241                            <goals>
242                                <goal>check</goal>
243                            </goals>
244                            <phase>process-sources</phase>
245                            <configuration>
246                                <configLocation>honeycomb-checkstyle-logging.xml</configLocation>
247                                <sourceDirectory>${project.basedir}</sourceDirectory>
248                                <outputFile>${project.build.directory}/checkstyle-logging-result.xml</outputFile>
249                            </configuration>
250                        </execution>
251                        <!-- Check HC's coding style -->
252                        <execution>
253                            <goals>
254                                <goal>check</goal>
255                            </goals>
256                            <phase>process-sources</phase>
257                            <configuration>
258                                <configLocation>honeycomb-checkstyle.xml</configLocation>
259                            </configuration>
260                        </execution>
261                    </executions>
262                    <dependencies>
263                        <dependency>
264                            <groupId>io.fd.honeycomb.common</groupId>
265                            <artifactId>honeycomb-checkstyle</artifactId>
266                            <!-- Hardcoded version to prevent archetype generated projects to use their own project version -->
267                            <version>1.17.01-SNAPSHOT</version>
268                        </dependency>
269                        <!-- Necessary for logging checks -->
270                        <dependency>
271                            <groupId>org.opendaylight.yangtools</groupId>
272                            <artifactId>checkstyle-logging</artifactId>
273                            <version>${yangtools.version}</version>
274                        </dependency>
275                        <!-- Needed by ODL's checkstyle-logging -->
276                        <dependency>
277                            <groupId>com.puppycrawl.tools</groupId>
278                            <artifactId>checkstyle</artifactId>
279                            <version>${checkstyle.version}</version>
280                        </dependency>
281                    </dependencies>
282                </plugin>
283                <!-- Deactivate strict java8 checks -->
284                <!-- TODO HONEYCOMB-156 fix all the javadoc offenders of doclint -->
285                <plugin>
286                    <groupId>org.apache.maven.plugins</groupId>
287                    <artifactId>maven-javadoc-plugin</artifactId>
288                    <version>${maven.javadoc.version}</version>
289                    <configuration>
290                        <additionalparam>-Xdoclint:none</additionalparam>
291                    </configuration>
292                    <executions>
293                        <execution>
294                            <id>attach-javadocs</id>
295                            <goals>
296                                <goal>jar</goal>
297                            </goals>
298                        </execution>
299                    </executions>
300                </plugin>
301                <!-- jacoco test coverage for sonar -->
302                <plugin>
303                    <groupId>org.jacoco</groupId>
304                    <artifactId>jacoco-maven-plugin</artifactId>
305                    <version>${jacoco.version}</version>
306                    <executions>
307                        <execution>
308                            <id>pre-unit-test</id>
309                            <goals>
310                                <goal>prepare-agent</goal>
311                            </goals>
312                            <configuration>
313                                <destFile>${sonar.jacoco.reportPath}</destFile>
314                            </configuration>
315                        </execution>
316                        <execution>
317                            <id>post-unit-test</id>
318                            <goals>
319                                <goal>report</goal>
320                            </goals>
321                            <configuration>
322                                <dataFile>${sonar.jacoco.reportPath}</dataFile>
323                            </configuration>
324                        </execution>
325                    </executions>
326                    <configuration>
327                        <excludes>
328                            <exclude>**/gen/**</exclude>
329                            <exclude>**/generated-sources/**</exclude>
330                            <exclude>**/yang-gen/**</exclude>
331                        </excludes>
332                    </configuration>
333                </plugin>
334                <!-- Enforce maven version -->
335                <plugin>
336                    <groupId>org.apache.maven.plugins</groupId>
337                    <artifactId>maven-enforcer-plugin</artifactId>
338                    <version>${enforcer.version}</version>
339                    <executions>
340                        <execution>
341                            <id>enforce-maven</id>
342                            <configuration>
343                                <rules>
344                                    <requireMavenVersion>
345                                        <version>3.1.1</version>
346                                    </requireMavenVersion>
347                                </rules>
348                            </configuration>
349                            <goals>
350                                <goal>enforce</goal>
351                            </goals>
352                        </execution>
353                    </executions>
354                </plugin>
355                <!-- Compile with google static analysis tool: error_prone -->
356                <plugin>
357                    <groupId>org.apache.maven.plugins</groupId>
358                    <artifactId>maven-compiler-plugin</artifactId>
359                    <version>${maven.compile.plugin.version}</version>
360                    <configuration>
361                        <!-- Use google's error-prone static analysis-->
362                        <compilerId>javac-with-errorprone</compilerId>
363                        <forceJavacCompilerUse>true</forceJavacCompilerUse>
364                        <showWarnings>true</showWarnings>
365                        <source>1.8</source>
366                        <target>1.8</target>
367                    </configuration>
368                    <dependencies>
369                        <dependency>
370                            <groupId>org.codehaus.plexus</groupId>
371                            <artifactId>plexus-compiler-javac-errorprone</artifactId>
372                            <version>2.5</version>
373                        </dependency>
374                        <!-- override plexus-compiler-javac-errorprone's dependency on
375                             Error Prone with the latest version -->
376                        <dependency>
377                            <groupId>com.google.errorprone</groupId>
378                            <artifactId>error_prone_core</artifactId>
379                            <version>2.0.9</version>
380                        </dependency>
381                    </dependencies>
382                </plugin>
383                <plugin>
384                    <groupId>org.apache.felix</groupId>
385                    <artifactId>maven-bundle-plugin</artifactId>
386                    <version>${maven.bundle.version}</version>
387                    <extensions>true</extensions>
388                </plugin>
389                <!-- Source jar -->
390                <plugin>
391                    <groupId>org.apache.maven.plugins</groupId>
392                    <artifactId>maven-source-plugin</artifactId>
393                    <executions>
394                        <execution>
395                            <id>attach-sources</id>
396                            <goals>
397                                <goal>jar</goal>
398                            </goals>
399                        </execution>
400                    </executions>
401                </plugin>
402                <!-- Site (from https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoc-maven-site-example/pom.xml) -->
403                <!-- + https://github.com/asciidoctor/asciidoctor-maven-plugin -->
404                <plugin>
405                    <groupId>org.apache.maven.plugins</groupId>
406                    <artifactId>maven-site-plugin</artifactId>
407                    <version>${maven.site.version}</version>
408                    <configuration>
409                        <generateReports>true</generateReports>
410                        <generateSitemap>true</generateSitemap>
411                        <relativizeDecorationLinks>false</relativizeDecorationLinks>
412                        <locales>en</locales>
413                        <inputEncoding>UTF-8</inputEncoding>
414                        <outputEncoding>UTF-8</outputEncoding>
415                        <siteDirectory>${project.basedir}</siteDirectory>
416                        <relativizeDecorationLinks>false</relativizeDecorationLinks>
417                        <asciidoc>
418                            <requires>
419                                <require>asciidoctor-diagram</require>
420                            </requires>
421                            <!-- optional site-wide AsciiDoc attributes -->
422                            <attributes>
423                                <source-highlighter>coderay</source-highlighter>
424                                <coderay-css>style</coderay-css>
425                                <icons>font</icons>
426                                <sectanchors>true</sectanchors>
427                                <idprefix/>
428                                <idseparator>-</idseparator>
429                            </attributes>
430                        </asciidoc>
431                        <!-- Exclude partial docs that are included elsewhere -->
432                        <moduleExcludes>
433                            <asciidoc>**/_*.adoc</asciidoc>
434                        </moduleExcludes>
435                    </configuration>
436                    <dependencies>
437                        <dependency>
438                            <groupId>org.asciidoctor</groupId>
439                            <artifactId>asciidoctor-maven-plugin</artifactId>
440                            <version>${asciidoctor.maven.plugin.version}</version>
441                        </dependency>
442                        <dependency>
443                            <groupId>org.asciidoctor</groupId>
444                            <artifactId>asciidoctorj-diagram</artifactId>
445                            <version>${asciidoctorj.diagram.version}</version>
446                        </dependency>
447                    </dependencies>
448                </plugin>
449                <plugin>
450                    <groupId>org.codehaus.gmaven</groupId>
451                    <artifactId>groovy-maven-plugin</artifactId>
452                    <version>${maven.groovy.version}</version>
453                    <executions>
454                        <!-- Generate Readme.adoc if not present -->
455                        <execution>
456                            <id>generate-adoc</id>
457                            <phase>generate-resources</phase>
458                            <goals>
459                                <goal>execute</goal>
460                            </goals>
461                            <configuration>
462                                <!-- Generate module adoc documentation -->
463                                <source>
464                                    io.fd.honeycomb.common.scripts.ReadmeGenerator.checkReadme(project, properties, log)
465                                </source>
466                            </configuration>
467                        </execution>
468                        <!-- Fix generated html -->
469                        <execution>
470                            <id>fix-generated-site</id>
471                            <phase>site</phase>
472                            <goals>
473                                <goal>execute</goal>
474                            </goals>
475                            <configuration>
476                                <!-- Site generates wrong link to Readme.html, trying to point to Readme.html at root -->
477                                <source>
478                                    io.fd.honeycomb.common.scripts.ReadmeGenerator.fixSite(project, properties, log)
479                                </source>
480                            </configuration>
481                        </execution>
482                    </executions>
483                    <dependencies>
484                        <dependency>
485                            <groupId>io.fd.honeycomb.common</groupId>
486                            <artifactId>common-scripts</artifactId>
487                            <version>1.17.01-SNAPSHOT</version>
488                        </dependency>
489                    </dependencies>
490                </plugin>
491            </plugins>
492        </pluginManagement>
493        <plugins>
494            <plugin>
495                <artifactId>maven-enforcer-plugin</artifactId>
496            </plugin>
497            <plugin>
498                <artifactId>maven-source-plugin</artifactId>
499            </plugin>
500            <plugin>
501                <artifactId>maven-javadoc-plugin</artifactId>
502            </plugin>
503            <plugin>
504                <artifactId>maven-checkstyle-plugin</artifactId>
505            </plugin>
506            <plugin>
507                <artifactId>maven-dependency-plugin</artifactId>
508            </plugin>
509            <plugin>
510                <artifactId>maven-compiler-plugin</artifactId>
511            </plugin>
512            <plugin>
513                <groupId>org.jacoco</groupId>
514                <artifactId>jacoco-maven-plugin</artifactId>
515            </plugin>
516            <plugin>
517                <groupId>org.apache.felix</groupId>
518                <artifactId>maven-bundle-plugin</artifactId>
519            </plugin>
520            <plugin>
521                <groupId>org.codehaus.gmaven</groupId>
522                <artifactId>groovy-maven-plugin</artifactId>
523            </plugin>
524        </plugins>
525
526        <!-- To support site push-->
527        <extensions>
528            <extension>
529                <groupId>org.apache.maven.wagon</groupId>
530                <artifactId>wagon-webdav-jackrabbit</artifactId>
531                <version>2.9</version>
532            </extension>
533        </extensions>
534    </build>
535
536    <reporting>
537        <plugins>
538            <plugin>
539                <groupId>org.apache.maven.plugins</groupId>
540                <artifactId>maven-project-info-reports-plugin</artifactId>
541                <version>${project.info.report.version}</version>
542                <reportSets>
543                    <reportSet>
544                        <reports>
545                            <report>index</report>
546                            <report>summary</report>
547                            <report>modules</report>
548                            <report>cim</report>
549                            <report>dependencies</report>
550                            <report>distribution-management</report>
551                            <report>mailing-list</report>
552                            <report>issue-tracking</report>
553                            <report>license</report>
554                            <report>scm</report>
555                        </reports>
556                    </reportSet>
557                </reportSets>
558            </plugin>
559            <plugin>
560                <groupId>org.apache.maven.plugins</groupId>
561                <artifactId>maven-javadoc-plugin</artifactId>
562                <version>${maven.javadoc.version}</version>
563                <reportSets>
564                    <reportSet>
565                        <id>default</id>
566                        <reports>
567                            <report>javadoc-no-fork</report>
568                        </reports>
569                    </reportSet>
570                </reportSets>
571                <configuration>
572                    <additionalparam>-Xdoclint:none</additionalparam>
573                </configuration>
574            </plugin>
575            <plugin>
576                <groupId>org.apache.maven.plugins</groupId>
577                <artifactId>maven-resources-plugin</artifactId>
578                <version>${maven.resources.version}</version>
579            </plugin>
580        </plugins>
581    </reporting>
582
583    <distributionManagement>
584        <repository>
585            <id>fdio-release</id>
586            <url>${nexusproxy}/repositories/fd.io.release/</url>
587        </repository>
588        <snapshotRepository>
589            <id>fdio-snapshot</id>
590            <url>${nexusproxy}/repositories/fd.io.snapshot/</url>
591        </snapshotRepository>
592        <site>
593            <id>fdio-site</id>
594            <url>dav:${docs.base.url}/${docs.hc.folder}/${project.version}</url>
595        </site>
596    </distributionManagement>
597
598    <repositories>
599        <!-- Using only ODL stable releases -->
600        <repository>
601            <releases>
602                <enabled>true</enabled>
603                <updatePolicy>never</updatePolicy>
604            </releases>
605            <snapshots>
606                <enabled>false</enabled>
607            </snapshots>
608            <id>opendaylight-mirror</id>
609            <name>opendaylight-mirror</name>
610            <url>${odl.nexusproxy}/repositories/public/</url>
611        </repository>
612    </repositories>
613</project>
614