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