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