pom.xml revision 6b29b8c1
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.10-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        <!-- Sonar configuration -->
35        <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
36        <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**</sonar.exclusions>
37
38        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
40
41        <!-- ODL dependencies -->
42        <yangtools.version>1.1.1-Carbon</yangtools.version>
43        <mdsal.version>2.2.1-Carbon</mdsal.version>
44        <mdsal.controller.version>1.5.1-Carbon</mdsal.controller.version>
45        <mdsalmodel.version>0.10.1-Carbon</mdsalmodel.version>
46        <netconf.version>1.2.1-Carbon</netconf.version>
47        <restconf.version>1.5.1-Carbon</restconf.version>
48        <salGenerator.version>0.10.1-Carbon</salGenerator.version>
49        <bgpcep.version>0.7.1-Carbon</bgpcep.version>
50        <salGeneratorPath>target/generated-sources/mdsal-binding</salGeneratorPath>
51
52        <!-- common dependencies -->
53        <junit.version>4.11</junit.version>
54        <mockito.version>2.2.9</mockito.version>
55        <hamcrest.version>1.3</hamcrest.version>
56        <guava.version>18.0</guava.version>
57        <jsr305.version>3.0.0</jsr305.version>
58        <slf4j.version>1.7.21</slf4j.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.9</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            <dependency>
169                <groupId>org.opendaylight.bgpcep</groupId>
170                <artifactId>bgpcep-artifacts</artifactId>
171                <version>${bgpcep.version}</version>
172                <type>pom</type>
173                <scope>import</scope>
174            </dependency>
175
176            <!-- Utilities -->
177            <dependency>
178                <groupId>com.google.guava</groupId>
179                <artifactId>guava</artifactId>
180                <version>${guava.version}</version>
181            </dependency>
182            <dependency>
183                <groupId>com.google.code.findbugs</groupId>
184                <artifactId>jsr305</artifactId>
185                <version>${jsr305.version}</version>
186            </dependency>
187            <dependency>
188                <groupId>org.slf4j</groupId>
189                <artifactId>slf4j-api</artifactId>
190                <version>${slf4j.version}</version>
191            </dependency>
192
193            <!-- Testing Dependencies -->
194            <dependency>
195                <groupId>junit</groupId>
196                <artifactId>junit</artifactId>
197                <version>${junit.version}</version>
198                <scope>test</scope>
199            </dependency>
200            <!-- Dont use mockito-all, it has problematic dependency on harmcrest
201                More details here - https://github.com/mockito/mockito/issues/324-->
202            <dependency>
203                <groupId>org.mockito</groupId>
204                <artifactId>mockito-core</artifactId>
205                <version>${mockito.version}</version>
206                <scope>test</scope>
207            </dependency>
208            <dependency>
209                <groupId>org.hamcrest</groupId>
210                <artifactId>hamcrest-all</artifactId>
211                <version>${hamcrest.version}</version>
212                <scope>test</scope>
213            </dependency>
214        </dependencies>
215    </dependencyManagement>
216
217    <build>
218        <pluginManagement>
219            <plugins>
220                <!-- checkstyle -->
221                <plugin>
222                    <artifactId>maven-checkstyle-plugin</artifactId>
223                    <version>${checkstyle.plugin.version}</version>
224                    <configuration>
225                        <!--TODO HONEYCOMB-155 enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
226                        <failOnViolation>false</failOnViolation>
227                        <failsOnError>true</failsOnError>
228                        <consoleOutput>true</consoleOutput>
229                        <includeTestResources>true</includeTestResources>
230                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
231                        <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
232                        <excludes>**\/target\/,
233                            **\/bin\/,
234                            **\/target-ide\/,
235                            **\/src/main/yang-gen-config\/,
236                            org/opendaylight/yang/gen/**,
237                            **\/src/main/yang-gen-sal\/,
238                            **\/src/main/xtend-gen\/,
239                            **\/src/main/yang\/,
240                            **\/archetype-resources\/,
241                            **\/.idea\/</excludes>
242                    </configuration>
243                    <executions>
244                        <!-- Override license check configuration to fit Honeycomb coding style-->
245                        <execution>
246                            <id>check-license</id>
247                            <goals>
248                                <goal>check</goal>
249                            </goals>
250                            <phase>process-sources</phase>
251                            <configuration>
252                                <configLocation>honeycomb-checkstyle-license.xml</configLocation>
253                                <outputFile>${project.build.directory}/checkstyle-license-result.xml</outputFile>
254                            </configuration>
255                        </execution>
256                        <!-- Add logging checks from yangtools -->
257                        <execution>
258                            <id>check-logging</id>
259                            <goals>
260                                <goal>check</goal>
261                            </goals>
262                            <phase>process-sources</phase>
263                            <configuration>
264                                <configLocation>honeycomb-checkstyle-logging.xml</configLocation>
265                                <sourceDirectory>${project.basedir}</sourceDirectory>
266                                <outputFile>${project.build.directory}/checkstyle-logging-result.xml</outputFile>
267                            </configuration>
268                        </execution>
269                        <!-- Check HC's coding style -->
270                        <execution>
271                            <goals>
272                                <goal>check</goal>
273                            </goals>
274                            <phase>process-sources</phase>
275                            <configuration>
276                                <configLocation>honeycomb-checkstyle.xml</configLocation>
277                            </configuration>
278                        </execution>
279                    </executions>
280                    <dependencies>
281                        <dependency>
282                            <groupId>io.fd.honeycomb.common</groupId>
283                            <artifactId>honeycomb-checkstyle</artifactId>
284                            <!-- Hardcoded version to prevent archetype generated projects to use their own project version -->
285                            <version>1.17.10-SNAPSHOT</version>
286                        </dependency>
287                        <!-- Necessary for logging checks -->
288                        <dependency>
289                            <groupId>org.opendaylight.yangtools</groupId>
290                            <artifactId>checkstyle-logging</artifactId>
291                            <version>${yangtools.version}</version>
292                        </dependency>
293                        <!-- Needed by ODL's checkstyle-logging -->
294                        <dependency>
295                            <groupId>com.puppycrawl.tools</groupId>
296                            <artifactId>checkstyle</artifactId>
297                            <version>${checkstyle.version}</version>
298                        </dependency>
299                    </dependencies>
300                </plugin>
301                <!-- Deactivate strict java8 checks -->
302                <!-- TODO HONEYCOMB-156 fix all the javadoc offenders of doclint -->
303                <plugin>
304                    <groupId>org.apache.maven.plugins</groupId>
305                    <artifactId>maven-javadoc-plugin</artifactId>
306                    <version>${maven.javadoc.version}</version>
307                    <configuration>
308                        <additionalparam>-Xdoclint:none</additionalparam>
309                    </configuration>
310                    <executions>
311                        <execution>
312                            <id>attach-javadocs</id>
313                            <goals>
314                                <goal>jar</goal>
315                            </goals>
316                        </execution>
317                    </executions>
318                </plugin>
319                <!-- jacoco test coverage for sonar -->
320                <plugin>
321                    <groupId>org.jacoco</groupId>
322                    <artifactId>jacoco-maven-plugin</artifactId>
323                    <version>${jacoco.version}</version>
324                    <executions>
325                        <execution>
326                            <id>pre-unit-test</id>
327                            <goals>
328                                <goal>prepare-agent</goal>
329                            </goals>
330                        </execution>
331                        <execution>
332                            <id>post-unit-test</id>
333                            <goals>
334                                <goal>report</goal>
335                            </goals>
336                        </execution>
337                    </executions>
338                    <configuration>
339                        <excludes>
340                            <exclude>**/gen/**</exclude>
341                            <exclude>**/generated-sources/**</exclude>
342                            <exclude>**/yang-gen/**</exclude>
343                        </excludes>
344                    </configuration>
345                </plugin>
346                <!-- Enforce maven version -->
347                <plugin>
348                    <groupId>org.apache.maven.plugins</groupId>
349                    <artifactId>maven-enforcer-plugin</artifactId>
350                    <version>${enforcer.version}</version>
351                    <executions>
352                        <execution>
353                            <id>enforce-maven</id>
354                            <configuration>
355                                <rules>
356                                    <requireMavenVersion>
357                                        <version>3.1.1</version>
358                                    </requireMavenVersion>
359                                </rules>
360                            </configuration>
361                            <goals>
362                                <goal>enforce</goal>
363                            </goals>
364                        </execution>
365                    </executions>
366                </plugin>
367                <!-- Compile with google static analysis tool: error_prone -->
368                <plugin>
369                    <groupId>org.apache.maven.plugins</groupId>
370                    <artifactId>maven-compiler-plugin</artifactId>
371                    <version>${maven.compile.plugin.version}</version>
372                    <configuration>
373                        <!-- Use google's error-prone static analysis-->
374                        <compilerId>javac-with-errorprone</compilerId>
375                        <forceJavacCompilerUse>true</forceJavacCompilerUse>
376                        <showWarnings>true</showWarnings>
377                        <source>1.8</source>
378                        <target>1.8</target>
379                    </configuration>
380                    <dependencies>
381                        <dependency>
382                            <groupId>org.codehaus.plexus</groupId>
383                            <artifactId>plexus-compiler-javac-errorprone</artifactId>
384                            <version>2.5</version>
385                        </dependency>
386                        <!-- override plexus-compiler-javac-errorprone's dependency on
387                             Error Prone with the latest version -->
388                        <dependency>
389                            <groupId>com.google.errorprone</groupId>
390                            <artifactId>error_prone_core</artifactId>
391                            <version>2.0.9</version>
392                        </dependency>
393                    </dependencies>
394                </plugin>
395                <plugin>
396                    <groupId>org.apache.felix</groupId>
397                    <artifactId>maven-bundle-plugin</artifactId>
398                    <version>${maven.bundle.version}</version>
399                    <extensions>true</extensions>
400                </plugin>
401                <!-- Source jar -->
402                <plugin>
403                    <groupId>org.apache.maven.plugins</groupId>
404                    <artifactId>maven-source-plugin</artifactId>
405                    <executions>
406                        <execution>
407                            <id>attach-sources</id>
408                            <goals>
409                                <goal>jar</goal>
410                            </goals>
411                        </execution>
412                    </executions>
413                </plugin>
414                <!-- Site (from https://github.com/asciidoctor/asciidoctor-maven-examples/blob/master/asciidoc-maven-site-example/pom.xml) -->
415                <!-- + https://github.com/asciidoctor/asciidoctor-maven-plugin -->
416                <plugin>
417                    <groupId>org.apache.maven.plugins</groupId>
418                    <artifactId>maven-site-plugin</artifactId>
419                    <version>${maven.site.version}</version>
420                    <configuration>
421                        <generateReports>true</generateReports>
422                        <generateSitemap>true</generateSitemap>
423                        <relativizeDecorationLinks>false</relativizeDecorationLinks>
424                        <locales>en</locales>
425                        <inputEncoding>UTF-8</inputEncoding>
426                        <outputEncoding>UTF-8</outputEncoding>
427                        <siteDirectory>${project.basedir}</siteDirectory>
428                        <relativizeDecorationLinks>false</relativizeDecorationLinks>
429                        <asciidoc>
430                            <requires>
431                                <require>asciidoctor-diagram</require>
432                            </requires>
433                            <!-- optional site-wide AsciiDoc attributes -->
434                            <attributes>
435                                <source-highlighter>coderay</source-highlighter>
436                                <coderay-css>style</coderay-css>
437                                <icons>font</icons>
438                                <sectanchors>true</sectanchors>
439                                <idprefix/>
440                                <idseparator>-</idseparator>
441                            </attributes>
442                        </asciidoc>
443                        <!-- Exclude partial docs that are included elsewhere -->
444                        <moduleExcludes>
445                            <asciidoc>**/_*.adoc</asciidoc>
446                        </moduleExcludes>
447                    </configuration>
448                    <dependencies>
449                        <dependency>
450                            <groupId>org.asciidoctor</groupId>
451                            <artifactId>asciidoctor-maven-plugin</artifactId>
452                            <version>${asciidoctor.maven.plugin.version}</version>
453                        </dependency>
454                        <dependency>
455                            <groupId>org.asciidoctor</groupId>
456                            <artifactId>asciidoctorj-diagram</artifactId>
457                            <version>${asciidoctorj.diagram.version}</version>
458                        </dependency>
459                    </dependencies>
460                </plugin>
461                <plugin>
462                    <groupId>org.codehaus.gmaven</groupId>
463                    <artifactId>groovy-maven-plugin</artifactId>
464                    <version>${maven.groovy.version}</version>
465                    <executions>
466                        <!-- Generate Readme.adoc if not present -->
467                        <execution>
468                            <id>generate-adoc</id>
469                            <phase>generate-resources</phase>
470                            <goals>
471                                <goal>execute</goal>
472                            </goals>
473                            <configuration>
474                                <!-- Generate module adoc documentation -->
475                                <source>
476                                    io.fd.honeycomb.common.scripts.ReadmeGenerator.checkReadme(project, properties, log)
477                                </source>
478                            </configuration>
479                        </execution>
480                        <!-- Fix generated html -->
481                        <execution>
482                            <id>fix-generated-site</id>
483                            <phase>site</phase>
484                            <goals>
485                                <goal>execute</goal>
486                            </goals>
487                            <configuration>
488                                <!-- Site generates wrong link to Readme.html, trying to point to Readme.html at root -->
489                                <source>
490                                    io.fd.honeycomb.common.scripts.ReadmeGenerator.fixSite(project, properties, log)
491                                </source>
492                            </configuration>
493                        </execution>
494                        <!-- copy generated schema pictures -->
495                        <execution>
496                            <id>copy-generated-pictures</id>
497                            <phase>site</phase>
498                            <goals>
499                                <goal>execute</goal>
500                            </goals>
501                            <configuration>
502                                <!-- Copies generated schema pictures from ascii-doctor folders to site folder-->
503                                <source>
504                                    io.fd.honeycomb.common.scripts.AsciiDocImgForwarder.copyGeneratedImages(project, properties, log)
505                                </source>
506                            </configuration>
507                        </execution>
508                    </executions>
509                    <dependencies>
510                        <dependency>
511                            <groupId>io.fd.honeycomb.common</groupId>
512                            <artifactId>common-scripts</artifactId>
513                            <version>1.17.10-SNAPSHOT</version>
514                        </dependency>
515                    </dependencies>
516                </plugin>
517            </plugins>
518        </pluginManagement>
519        <plugins>
520            <plugin>
521                <artifactId>maven-enforcer-plugin</artifactId>
522            </plugin>
523            <plugin>
524                <artifactId>maven-source-plugin</artifactId>
525            </plugin>
526            <plugin>
527                <artifactId>maven-javadoc-plugin</artifactId>
528            </plugin>
529            <plugin>
530                <artifactId>maven-checkstyle-plugin</artifactId>
531            </plugin>
532            <plugin>
533                <artifactId>maven-dependency-plugin</artifactId>
534            </plugin>
535            <plugin>
536                <artifactId>maven-compiler-plugin</artifactId>
537            </plugin>
538            <plugin>
539                <groupId>org.jacoco</groupId>
540                <artifactId>jacoco-maven-plugin</artifactId>
541            </plugin>
542            <plugin>
543                <groupId>org.apache.felix</groupId>
544                <artifactId>maven-bundle-plugin</artifactId>
545            </plugin>
546            <plugin>
547                <groupId>org.codehaus.gmaven</groupId>
548                <artifactId>groovy-maven-plugin</artifactId>
549            </plugin>
550        </plugins>
551
552        <!-- To support site push-->
553        <extensions>
554            <extension>
555                <groupId>org.apache.maven.wagon</groupId>
556                <artifactId>wagon-webdav-jackrabbit</artifactId>
557                <version>2.9</version>
558            </extension>
559        </extensions>
560    </build>
561
562    <reporting>
563        <plugins>
564            <plugin>
565                <groupId>org.apache.maven.plugins</groupId>
566                <artifactId>maven-project-info-reports-plugin</artifactId>
567                <version>${project.info.report.version}</version>
568                <reportSets>
569                    <reportSet>
570                        <reports>
571                            <report>index</report>
572                            <report>summary</report>
573                            <report>modules</report>
574                            <report>cim</report>
575                            <report>dependencies</report>
576                            <report>distribution-management</report>
577                            <report>mailing-list</report>
578                            <report>issue-tracking</report>
579                            <report>license</report>
580                            <report>scm</report>
581                        </reports>
582                    </reportSet>
583                </reportSets>
584            </plugin>
585            <plugin>
586                <groupId>org.apache.maven.plugins</groupId>
587                <artifactId>maven-javadoc-plugin</artifactId>
588                <version>${maven.javadoc.version}</version>
589                <reportSets>
590                    <reportSet>
591                        <id>default</id>
592                        <reports>
593                            <report>javadoc-no-fork</report>
594                        </reports>
595                    </reportSet>
596                </reportSets>
597                <configuration>
598                    <additionalparam>-Xdoclint:none</additionalparam>
599                </configuration>
600            </plugin>
601            <plugin>
602                <groupId>org.apache.maven.plugins</groupId>
603                <artifactId>maven-resources-plugin</artifactId>
604                <version>${maven.resources.version}</version>
605            </plugin>
606        </plugins>
607    </reporting>
608
609    <distributionManagement>
610        <repository>
611            <id>fdio-release</id>
612            <url>${nexusproxy}/repositories/fd.io.release/</url>
613        </repository>
614        <snapshotRepository>
615            <id>fdio-snapshot</id>
616            <url>${nexusproxy}/repositories/fd.io.snapshot/</url>
617        </snapshotRepository>
618        <site>
619            <id>fdio-site</id>
620            <url>dav:${docs.base.url}/${docs.hc.folder}/${project.version}</url>
621        </site>
622    </distributionManagement>
623
624    <repositories>
625        <!-- Using only ODL stable releases -->
626        <repository>
627            <releases>
628                <enabled>true</enabled>
629                <updatePolicy>never</updatePolicy>
630            </releases>
631            <snapshots>
632                <enabled>false</enabled>
633            </snapshots>
634            <id>opendaylight-mirror</id>
635            <name>opendaylight-mirror</name>
636            <url>${odl.nexusproxy}/repositories/public/</url>
637        </repository>
638    </repositories>
639</project>
640