Upgrading versions
[ccsdk/parent.git] / odlparent / single-feature-parent / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3     <modelVersion>4.0.0</modelVersion>
4
5     <!-- PLEASE READ !!!!! This file is generated from ccsdk/parent/setup/src/main/template/pom-template.xml
6         Any updates needed should be made to that template and not to the generated
7         pom.xml file -->
8     <parent>
9         <groupId>org.opendaylight.odlparent</groupId>
10         <artifactId>single-feature-parent</artifactId>
11         <version>5.0.7</version>
12         <relativePath/>
13     </parent>
14
15     <groupId>org.onap.ccsdk.parent</groupId>
16     <artifactId>single-feature-parent</artifactId>
17     <version>2.0.1-SNAPSHOT</version>
18     <packaging>pom</packaging>
19
20     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
21     <description>Root POM to be used in place of odlparent for CCSDK based projects</description>
22     <url>http://wiki.onap.org</url>
23     <organization>
24         <name>ONAP</name>
25     </organization>
26
27     <issueManagement>
28         <system>JIRA</system>
29         <url>https://jira.onap.org/</url>
30     </issueManagement>
31     <distributionManagement>
32         <repository>
33             <id>ecomp-releases</id>
34             <url>${onap.nexus.release-url}</url>
35         </repository>
36         <snapshotRepository>
37             <id>ecomp-snapshots</id>
38             <url>${onap.nexus.snapshot-url}</url>
39         </snapshotRepository>
40     </distributionManagement>
41
42     <properties>
43         <!-- Sonar properties -->
44         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
45         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
46         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
47         <!-- Default Sonar configuration -->
48         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml,${project.reporting.outputDirectory}/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
49         <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
50         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
51
52         <!-- Jacoco properties -->
53         <jacoco.version>0.8.5</jacoco.version>
54
55         <!-- properties from oparent -->
56         <maven.compiler.source>8</maven.compiler.source>
57         <maven.compiler.target>8</maven.compiler.target>
58         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
59         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
60         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
61         <!-- sitePath may be overridden in the inheriting POM if desired -->
62         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
63
64         <!-- If following file exist, auto-generation of swagger.json will be done -->
65         <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
66         <!-- If following file exist, auto-generation of sdk will be done -->
67         <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
68         <!-- end of properties from oparent -->
69
70         <!-- ONAP repositories -->
71         <onap.nexus.host>nexus.onap.org</onap.nexus.host>
72         <onap.nexus.port>443</onap.nexus.port>
73         <onap.nexus.protocol>https</onap.nexus.protocol>
74         <onap.nexus.public-url>https://nexus.onap.org/content/groups/public</onap.nexus.public-url>
75         <onap.nexus.staging-url>https://nexus.onap.org/content/groups/staging</onap.nexus.staging-url>
76         <onap.nexus.release-url>https://nexus.onap.org/content/repositories/releases</onap.nexus.release-url>
77         <onap.nexus.snapshot-url>https://nexus.onap.org/content/repositories/snapshots</onap.nexus.snapshot-url>
78         <onap.nexus.staging.server-id>ecomp-staging</onap.nexus.staging.server-id>
79         <onap.nexus.staging.profile-id>176c31dfe190a</onap.nexus.staging.profile-id>
80
81         <!-- OpenDaylight repositories -->
82         <opendaylight.nexus.public-url>https://nexus.opendaylight.org/content/repositories/public/</opendaylight.nexus.public-url>
83         <opendaylight.nexus.snapshot-url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</opendaylight.nexus.snapshot-url>
84
85         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
86         <java.version.source>8</java.version.source>
87         <java.version.target>8</java.version.target>
88         <bundle.plugin.version>2.5.0</bundle.plugin.version>
89         <maven.compile.plugin.version>2.5.1</maven.compile.plugin.version>
90         <features.file>features.xml</features.file>
91         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
92         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
93         <checkstyle.skip>true</checkstyle.skip>
94
95         <!-- logging-analytics versions -->
96         <logging-analytics.version>1.6.6</logging-analytics.version>
97
98         <!-- CCSDK component versions -->
99         <ccsdk.cds.version>1.0.0-SNAPSHOT</ccsdk.cds.version>
100         <ccsdk.features.version>1.0.1-SNAPSHOT</ccsdk.features.version>
101         <ccsdk.sli.core.version>1.0.1-SNAPSHOT</ccsdk.sli.core.version>
102         <ccsdk.sli.adaptors.version>1.0.1-SNAPSHOT</ccsdk.sli.adaptors.version>
103         <ccsdk.sli.northbound.version>1.0.1-SNAPSHOT</ccsdk.sli.northbound.version>
104         <ccsdk.sli.plugins.version>1.0.1-SNAPSHOT</ccsdk.sli.plugins.version>
105         <ccsdk.distribution.version>1.0.0-SNAPSHOT</ccsdk.distribution.version>
106         <sdnctl.sli.version>${ccsdk.sli.core.version}</sdnctl.sli.version>
107         <sdnctl.aai.service.version>${ccsdk.sli.adaptors.version}</sdnctl.aai.service.version>
108         <sdnctl.dblib.version>${ccsdk.sli.core.version}</sdnctl.dblib.version>
109         <sdnctl.mdsal.resource.version>${ccsdk.sli.adaptors.version}</sdnctl.mdsal.resource.version>
110         <sdnctl.slipluginutils.version>${ccsdk.sli.core.version}</sdnctl.slipluginutils.version>
111
112         <!-- Support libraries used by OpenDaylight -->
113         <odl.controller.mdsal.version>1.10.3</odl.controller.mdsal.version>
114         <odl.mdsal.version>4.0.14</odl.mdsal.version>
115         <odl.mdsal.model.version>2.0.14</odl.mdsal.model.version>
116         <odl.netconf.restconf.version>1.10.3</odl.netconf.restconf.version>
117         <odl.netconf.netconf.version>1.7.3</odl.netconf.netconf.version>
118         <odl.netconf.sal.rest.docgen.version>1.10.3</odl.netconf.sal.rest.docgen.version>
119
120         <!-- Used by aaa, vtn -->
121         <commons.codec.version>1.13</commons.codec.version>
122         <!-- Used by netconf, ovsdb -->
123         <commons.lang3.version>3.8.1</commons.lang3.version>
124         <!-- Used by sfc, snmp4sdn; see also affinity, toolkit -->
125         <commons.lang.version>2.6</commons.lang.version>
126         <!-- Used by neutron; see also controller, vtn -->
127         <commons.net.version>3.6</commons.net.version>
128         <!-- Used by neutron -->
129         <eclipse.persistence.version>2.7.4</eclipse.persistence.version>
130         <!-- Used by aaa -->
131         <felix.dependencymanager.version>4.4.1</felix.dependencymanager.version>
132         <!-- Used by lacp, netconf, ovsdb, sfc, toolkit; see also vtn -->
133         <gson.version>2.8.5</gson.version>
134         <!-- Used by aaa, dlux, persistence, snmp4sdn, sxp -->
135         <guava.version>25.1-jre</guava.version>
136         <!-- Used by aaa, alto, netconf, ovsdb, sfc; see also affinity, defense4all,
137             integration/distribution, snmp4sdn, toolkit, ttp -->
138         <jackson.version>2.9.10</jackson.version>
139         <!-- Used by snmp4sdn, yangtools -->
140         <javassist.version>3.24.1-GA</javassist.version>
141
142         <!-- FIXME remove all dependencies for jersey 1.17 after migration all projects -->
143         <!-- Used by aaa, alto, netconf, neutron, sfc; see also affinity, defense4all, snmp4sdn, toolkit -->
144         <jersey.version>2.25.1</jersey.version>
145         <!-- Used by sfc -->
146         <jersey.client.version>2.25.1</jersey.client.version>
147
148         <!-- New packages for jersey migration 1.17 to 2.8 -->
149         <!-- appache.geronimo.bundle for DocGen -->
150         <!-- Used by aaa, iotdm, netconf, ovsdb, sfc -->
151         <org.json.version>20131018</org.json.version>
152
153         <!-- Used everywhere -->
154         <junit.version>4.12</junit.version>
155         <!-- Used by coretutorials, sfc, snmp4sdn, sxp; see also affinity, toolkit -->
156         <logback.version>1.2.3</logback.version>
157         <!-- Used by nic, sfc, sxp, tsdr -->
158         <mockito.version>1.10.19</mockito.version>
159         <!-- Used by bgpcep, netconf, ovsdb, sxp; see also opendove, toolkit -->
160         <netty.version>4.1.42.Final</netty.version>
161         <!-- Used by openflowjava, persistence, sfc, snmp4sdn, sxp; see also affinity, toolkit -->
162         <slf4j.version>1.7.25</slf4j.version>
163         <!-- Used in integration/distribution; see also affinity, snmp4sdn, toolkit, tsdr, ttp -->
164         <spring.version>4.3.25.RELEASE</spring.version>
165
166         <!-- Extra support libraries used by SDN-C -->
167         <jvnet.jaxb2.version>0.6.4</jvnet.jaxb2.version>
168         <antlr.version>4.7.2</antlr.version>
169
170         <eelf.maven.plugin.version>1.0.0</eelf.maven.plugin.version>
171
172         <!-- Managed dependency versions -->
173         <apache.httpcomponents.core.version>4.4.12</apache.httpcomponents.core.version>
174         <apache.httpcomponents.client.version>4.5.10</apache.httpcomponents.client.version>
175         <derby.version>10.14.2.0</derby.version>
176         <eelf.version>1.0.0</eelf.version>
177         <grpc.version>1.21.1</grpc.version>
178         <mariadb.connector.version>2.4.4</mariadb.connector.version>
179         <mariadb4j.version>2.4.0</mariadb4j.version>
180         <testng.version>6.14.3</testng.version>
181         <tomcat-jdbc.version>9.0.30</tomcat-jdbc.version>
182         <jetty.version>9.4.12.v20180830</jetty.version>
183         <skip.karaf.featureTest>true</skip.karaf.featureTest>
184         <dependency-list.file>direct-dependencies.txt</dependency-list.file>
185     </properties>
186
187     <dependencyManagement>
188         <dependencies>
189             <!-- Note: If value in BOM conflicts with value inherited from
190             parent pom, inherited value takes precedence.  This seems more like
191             a bug than a feature, but this is how maven 3.6 works -->
192             <dependency>
193                 <groupId>org.onap.ccsdk.parent</groupId>
194                 <artifactId>dependencies-odl-bom</artifactId>
195                 <version>2.0.1-SNAPSHOT</version>
196                 <type>pom</type>
197                 <scope>import</scope>
198             </dependency>
199             <dependency>
200                 <groupId>org.onap.logging-analytics</groupId>
201                 <artifactId>logging-slf4j</artifactId>
202                 <version>${logging-analytics.version}</version>
203             </dependency>
204             <dependency>
205                 <groupId>org.onap.logging-analytics</groupId>
206                 <artifactId>logging-filter-base</artifactId>
207                 <version>${logging-analytics.version}</version>
208             </dependency>
209             <dependency>
210                 <groupId>junit</groupId>
211                 <artifactId>junit</artifactId>
212                 <version>${junit.version}</version>
213                 <scope>test</scope>
214             </dependency>
215         </dependencies>
216     </dependencyManagement>
217
218     <repositories>
219         <repository>
220             <id>onap-public</id>
221             <url>${onap.nexus.public-url}</url>
222             <releases>
223                 <enabled>true</enabled>
224                 <updatePolicy>never</updatePolicy>
225             </releases>
226             <snapshots>
227                 <enabled>true</enabled>
228                 <updatePolicy>always</updatePolicy>
229             </snapshots>
230         </repository>
231         <repository>
232             <id>onap-staging</id>
233             <url>${onap.nexus.staging-url}</url>
234             <releases>
235                 <enabled>true</enabled>
236                 <updatePolicy>never</updatePolicy>
237             </releases>
238             <snapshots>
239                 <enabled>true</enabled>
240                 <updatePolicy>always</updatePolicy>
241             </snapshots>
242         </repository>
243         <repository>
244             <id>ecomp-release</id>
245             <name>onap-repository-releases</name>
246             <url>${onap.nexus.release-url}</url>
247             <releases>
248                 <enabled>true</enabled>
249                 <updatePolicy>never</updatePolicy>
250             </releases>
251             <snapshots>
252                 <enabled>false</enabled>
253             </snapshots>
254         </repository>
255         <repository>
256             <id>ecomp-snapshot</id>
257             <name>onap-repository-snapshots</name>
258             <url>${onap.nexus.snapshot-url}</url>
259             <releases>
260                 <enabled>false</enabled>
261             </releases>
262             <snapshots>
263                 <enabled>true</enabled>
264             </snapshots>
265         </repository>
266         <repository>
267             <id>opendaylight-mirror</id>
268             <name>opendaylight-mirror</name>
269             <url>${opendaylight.nexus.public-url}</url>
270             <releases>
271                 <enabled>true</enabled>
272                 <updatePolicy>never</updatePolicy>
273             </releases>
274             <snapshots>
275                 <enabled>false</enabled>
276             </snapshots>
277         </repository>
278         <repository>
279             <id>opendaylight-snapshot</id>
280             <name>opendaylight-snapshot</name>
281             <url>${opendaylight.nexus.snapshot-url}</url>
282             <releases>
283                 <enabled>false</enabled>
284             </releases>
285             <snapshots>
286                 <enabled>true</enabled>
287             </snapshots>
288         </repository>
289
290     </repositories>
291     <pluginRepositories>
292         <pluginRepository>
293             <id>onap-public</id>
294             <url>${onap.nexus.public-url}</url>
295             <releases>
296                 <enabled>true</enabled>
297             </releases>
298             <snapshots>
299                 <enabled>true</enabled>
300             </snapshots>
301         </pluginRepository>
302         <pluginRepository>
303             <id>onap-staging</id>
304             <url>${onap.nexus.staging-url}</url>
305             <releases>
306                 <enabled>true</enabled>
307             </releases>
308             <snapshots>
309                 <enabled>true</enabled>
310             </snapshots>
311         </pluginRepository>
312         <pluginRepository>
313             <id>onap-snapshot</id>
314             <url>${onap.nexus.snapshot-url}</url>
315             <releases>
316                 <enabled>false</enabled>
317             </releases>
318             <snapshots>
319                 <enabled>true</enabled>
320             </snapshots>
321         </pluginRepository>
322         <pluginRepository>
323             <id>opendaylight-mirror</id>
324             <name>opendaylight-mirror</name>
325             <url>${opendaylight.nexus.public-url}</url>
326             <releases>
327                 <enabled>true</enabled>
328                 <updatePolicy>never</updatePolicy>
329             </releases>
330             <snapshots>
331                 <enabled>false</enabled>
332             </snapshots>
333         </pluginRepository>
334         <pluginRepository>
335             <id>opendaylight-snapshot</id>
336             <name>opendaylight-snapshot</name>
337             <url>${opendaylight.nexus.snapshot-url}</url>
338             <releases>
339                 <enabled>false</enabled>
340             </releases>
341             <snapshots>
342                 <enabled>true</enabled>
343             </snapshots>
344         </pluginRepository>
345         <!-- Black Duck plugin dependencies -->
346         <pluginRepository>
347             <id>JCenter</id>
348             <name>JCenter Repository</name>
349             <url>http://jcenter.bintray.com</url>
350         </pluginRepository>
351
352         <pluginRepository>
353             <id>Restlet</id>
354             <name>Restlet Repository</name>
355             <url>http://maven.restlet.com</url>
356         </pluginRepository>
357     </pluginRepositories>
358
359     <build>
360         <pluginManagement>
361             <plugins>
362                 <!-- Plugins from ONAP version (parent of oparent) -->
363                 <plugin>
364                     <groupId>org.apache.maven.plugins</groupId>
365                     <artifactId>maven-deploy-plugin</artifactId>
366                     <!-- This version supports the "deployAtEnd" parameter -->
367                     <version>2.8</version>
368                     <configuration>
369                         <skip/>
370                     </configuration>
371                 </plugin>
372                 <plugin>
373                     <groupId>org.apache.maven.plugins</groupId>
374                     <artifactId>maven-site-plugin</artifactId>
375                     <version>3.6</version>
376                     <dependencies>
377                         <dependency>
378                             <groupId>org.apache.maven.wagon</groupId>
379                             <artifactId>wagon-webdav-jackrabbit</artifactId>
380                             <version>2.10</version>
381                         </dependency>
382                     </dependencies>
383                 </plugin>
384                 <plugin>
385                     <groupId>org.apache.maven.plugins</groupId>
386                     <artifactId>maven-enforcer-plugin</artifactId>
387                     <version>3.0.0-M2</version>
388                     <executions>
389                         <execution>
390                             <id>enforce-property</id>
391                             <goals>
392                                 <goal>enforce</goal>
393                             </goals>
394                             <configuration>
395                                 <rules>
396                                     <requireProperty>
397                                         <property>onap.nexus.url</property>
398                                         <message>You must set a onap.nexus.url property in your
399                                             ~/.m2/settings.xml. See oparent/settings.xml for an example.
400                                         </message>
401                                     </requireProperty>
402                                 </rules>
403                                 <fail>true</fail>
404                             </configuration>
405                         </execution>
406                         <execution>
407                             <id>enforce-no-snapshots</id>
408                             <goals>
409                                 <goal>enforce</goal>
410                             </goals>
411                             <configuration>
412                                 <rules>
413                                     <requireReleaseDeps>
414                                         <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
415                                         <onlyWhenRelease>true</onlyWhenRelease>
416                                         <level>WARN</level>
417                                     </requireReleaseDeps>
418                                 </rules>
419                             </configuration>
420                         </execution>
421                         <execution>
422                             <id>enforce-maven</id>
423                             <goals>
424                             <goal>enforce</goal>
425                             </goals>
426                             <configuration>
427                             <rules>
428                                 <requireJavaVersion>
429                                 <version>8</version>
430                                 </requireJavaVersion>
431                                 <requireMavenVersion>
432                                 <version>[3.5.0,)</version>
433                                 </requireMavenVersion>
434                             </rules>
435                             </configuration>
436                         </execution>
437                         <execution>
438                             <id>enforce-banned-dependencies</id>
439                             <goals>
440                             <goal>enforce</goal>
441                             </goals>
442                             <configuration>
443                             <rules>
444                                 <bannedDependencies>
445                                 <message>Please always use mockito-core instead of mockito-all (see https://bugs.opendaylight.org/show_bug.cgi?id=7662), and spotbugs:annotations instead of findbugs:annotations</message>
446                                 <excludes>
447                                     <exclude>org.mockito:mockito-all</exclude>
448                 <!--                     <exclude>com.google.code.findbugs:annotations</exclude> -->
449                                 </excludes>
450                                 </bannedDependencies>
451                             </rules>
452                             <fail>true</fail>
453                             </configuration>
454                         </execution>
455                     </executions>
456                 </plugin>
457                 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
458                 <plugin>
459                     <groupId>org.sonarsource.scanner.maven</groupId>
460                     <artifactId>sonar-maven-plugin</artifactId>
461                     <version>${sonar.scanner.version}</version>
462                 </plugin>
463                 <!-- end of plugins from ONAP version (parent of oparent) -->
464
465                 <!-- Plugins from ONAP oparent -->
466                 <plugin>
467                     <groupId>org.apache.maven.plugins</groupId>
468                     <artifactId>maven-surefire-plugin</artifactId>
469                     <version>2.22.0</version>
470                     <configuration>
471                         <!-- Sets the VM argument line used when unit tests are run. -->
472                         <argLine>${surefireArgLine}</argLine>
473                         <!-- Excludes integration tests when unit tests are run. -->
474                         <excludes>
475                             <exclude>**/IT*.java</exclude>
476                         </excludes>
477                     </configuration>
478                 </plugin>
479                 <plugin>
480                     <groupId>org.apache.maven.plugins</groupId>
481                     <artifactId>maven-failsafe-plugin</artifactId>
482                     <version>2.22.0</version>
483                     <executions>
484                         <!-- Ensures that both integration-test and verify goals of the Failsafe
485                             Maven plugin are executed. -->
486                         <execution>
487                             <id>integration-tests</id>
488                             <goals>
489                                 <goal>integration-test</goal>
490                                 <goal>verify</goal>
491                             </goals>
492                             <configuration>
493                                 <!-- Sets the VM argument line used when integration tests are run. -->
494                                 <argLine>${failsafeArgLine}</argLine>
495                             </configuration>
496                         </execution>
497                     </executions>
498                 </plugin>
499
500                 <!-- End of plugins from ONAP oparent -->
501                 <plugin>
502                     <groupId>org.codehaus.mojo</groupId>
503                     <artifactId>properties-maven-plugin</artifactId>
504                     <version>1.0.0</version>
505                     <executions>
506                         <execution>
507                             <goals>
508                                 <goal>set-system-properties</goal>
509                             </goals>
510                             <configuration>
511                                 <properties>
512                                     <property>
513                                         <name>maven.wagon.http.ssl.allowall</name>
514                                         <value>${ssl.allowall}</value>
515                                     </property>
516                                     <property>
517                                         <name>maven.wagon.http.ssl.insecure</name>
518                                         <value>${ssl.insecure}</value>
519                                     </property>
520                                 </properties>
521                             </configuration>
522                         </execution>
523                     </executions>
524                 </plugin>
525
526                 <plugin>
527                     <groupId>org.codehaus.mojo</groupId>
528                     <artifactId>versions-maven-plugin</artifactId>
529                     <version>2.5</version>
530                     <configuration>
531                         <processAllModules>true</processAllModules>
532                     </configuration>
533                 </plugin>
534                 <plugin>
535                     <artifactId>maven-scm-plugin</artifactId>
536                     <version>1.8.1</version>
537                     <configuration>
538                         <tag>${project.artifactId}-${project.version}</tag>
539                     </configuration>
540                 </plugin>
541                 <plugin>
542                     <groupId>com.github.ferstl</groupId>
543                     <artifactId>depgraph-maven-plugin</artifactId>
544                     <version>3.3.0</version>
545                     <configuration>
546                         <graphFormat>text</graphFormat>
547                         <outputFileName>${dependency-list.file}</outputFileName>
548                         <outputDirectory>${project.basedir}</outputDirectory>
549                         <transitiveExcludes>*</transitiveExcludes>
550                         <showVersions>true</showVersions>
551                         <showGroupIds>true</showGroupIds>
552                     </configuration>
553                 </plugin>
554             </plugins>
555         </pluginManagement>
556         <plugins>
557
558             <!-- Plugins from oparent version (parent of oparent) -->
559             <plugin>
560                 <groupId>org.apache.maven.plugins</groupId>
561                 <artifactId>maven-deploy-plugin</artifactId>
562             </plugin>
563             <plugin>
564                 <groupId>org.apache.maven.plugins</groupId>
565                 <artifactId>maven-site-plugin</artifactId>
566             </plugin>
567             <!-- end of plugins from oparent version (parent of oparent) -->
568
569             <!-- Plugins from oparent -->
570             <plugin>
571                 <artifactId>maven-checkstyle-plugin</artifactId>
572                 <version>2.17</version>
573                 <dependencies>
574                     <dependency>
575                         <groupId>org.onap.oparent</groupId>
576                         <artifactId>checkstyle</artifactId>
577                         <version>1.2.2</version>
578                     </dependency>
579                 </dependencies>
580                 <executions>
581                     <execution>
582                         <id>onap-license</id>
583                         <goals>
584                             <goal>check</goal>
585                         </goals>
586                         <phase>process-sources</phase>
587                         <configuration>
588                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
589                             <includeResources>false</includeResources>
590                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
591                             <includeTestResources>false</includeTestResources>
592                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
593                             <excludes>
594                             </excludes>
595                             <consoleOutput>true</consoleOutput>
596                             <failOnViolation>false</failOnViolation>
597                         </configuration>
598                     </execution>
599                     <execution>
600                         <id>onap-java-style</id>
601                         <goals>
602                             <goal>check</goal>
603                         </goals>
604                         <phase>process-sources</phase>
605                         <configuration>
606                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
607                                 with minor changes -->
608                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
609                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
610                             <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
611                             <includeResources>true</includeResources>
612                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
613                             <includeTestResources>true</includeTestResources>
614                             <excludes>
615                             </excludes>
616                             <consoleOutput>true</consoleOutput>
617                             <failOnViolation>false</failOnViolation>
618                         </configuration>
619                     </execution>
620                 </executions>
621             </plugin>
622             <plugin>
623                 <groupId>org.codehaus.mojo</groupId>
624                 <artifactId>build-helper-maven-plugin</artifactId>
625                 <version>1.12</version>
626             </plugin>
627             <!-- Jacoco / Sonar -->
628             <plugin>
629                 <groupId>org.jacoco</groupId>
630                 <artifactId>jacoco-maven-plugin</artifactId>
631                 <version>${jacoco.version}</version>
632                 <executions>
633                     <execution>
634                         <id>pre-unit-test</id>
635                         <goals>
636                             <goal>prepare-agent</goal>
637                         </goals>
638                         <configuration>
639                             <!-- Sets the path to the file which contains the execution data. -->
640                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
641                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
642                             <propertyName>surefireArgLine</propertyName>
643                         </configuration>
644                     </execution>
645                     <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
646                     <execution>
647                         <id>post-unit-test</id>
648                         <phase>test</phase>
649                         <goals>
650                             <goal>report</goal>
651                         </goals>
652                         <configuration>
653                             <!-- Sets the path to the file which contains the execution data. -->
654                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
655                             <!-- Sets the output directory for the code coverage report. -->
656                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
657                         </configuration>
658                     </execution>
659                     <execution>
660                         <id>pre-integration-test</id>
661                         <phase>pre-integration-test</phase>
662                         <goals>
663                             <goal>prepare-agent</goal>
664                         </goals>
665                         <configuration>
666                             <!-- Sets the path to the file which contains the execution data. -->
667                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
668                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
669                             <propertyName>failsafeArgLine</propertyName>
670                         </configuration>
671                     </execution>
672                     <!-- Ensures that the code coverage report for integration tests after integration tests have been run. -->
673                     <execution>
674                         <id>post-integration-test</id>
675                         <phase>post-integration-test</phase>
676                         <goals>
677                             <goal>report</goal>
678                         </goals>
679                         <configuration>
680                             <!-- Sets the path to the file which contains the execution data. -->
681                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
682                             <!-- Sets the output directory for the code coverage report. -->
683                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
684                         </configuration>
685                     </execution>
686                     <execution>
687                         <id>default-prepare-agent</id>
688                         <goals>
689                             <goal>prepare-agent</goal>
690                         </goals>
691                     </execution>
692                     <execution>
693                         <id>default-report</id>
694                         <phase>prepare-package</phase>
695                         <goals>
696                             <goal>report</goal>
697                         </goals>
698                     </execution>
699                     <execution>
700                         <id>default-check</id>
701                         <goals>
702                             <goal>check</goal>
703                         </goals>
704                         <configuration>
705                             <rules>
706                                 <rule>
707                                     <element>PACKAGE</element>
708                                     <limits>
709                                         <limit>
710                                             <counter>COMPLEXITY</counter>
711                                             <value>COVEREDRATIO</value>
712                                             <minimum>0.0</minimum>
713                                         </limit>
714                                     </limits>
715                                 </rule>
716                             </rules>
717                         </configuration>
718                     </execution>
719                 </executions>
720             </plugin>
721             <plugin>
722                 <groupId>org.apache.maven.plugins</groupId>
723                 <artifactId>maven-surefire-plugin</artifactId>
724             </plugin>
725             <plugin>
726                 <groupId>org.apache.maven.plugins</groupId>
727                 <artifactId>maven-failsafe-plugin</artifactId>
728             </plugin>
729             <!-- end of plugins from oparent -->
730             <plugin>
731                 <groupId>org.apache.maven.plugins</groupId>
732                 <artifactId>maven-javadoc-plugin</artifactId>
733                 <executions>
734                     <execution>
735                         <id>attach-javadocs</id>
736                         <goals>
737                             <goal>jar</goal>
738                         </goals>
739                         <configuration>
740                             <additionalparam>-Xdoclint:none</additionalparam>
741                         </configuration>
742                     </execution>
743                 </executions>
744             </plugin>
745             <plugin>
746                 <artifactId>maven-enforcer-plugin</artifactId>
747                 <version>3.0.0-M2</version>
748                 <executions>
749                     <execution>
750                         <id>enforce-property</id>
751                         <goals>
752                             <goal>enforce</goal>
753                         </goals>
754                         <configuration>
755                             <rules>
756                                 <requireProperty>
757                                     <property>onap.nexus.url</property>
758                                     <message>You must set a onap.nexus.url property in your
759                                         ~/.m2/settings.xml. See oparent/settings.xml for an example.</message>
760                                 </requireProperty>
761                             </rules>
762                             <fail>true</fail>
763                         </configuration>
764                     </execution>
765                     <execution>
766                         <id>enforce-no-snapshots</id>
767                         <goals>
768                             <goal>enforce</goal>
769                         </goals>
770                         <configuration>
771                             <rules>
772                                 <requireReleaseDeps>
773                                     <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
774                                     <onlyWhenRelease>true</onlyWhenRelease>
775                                     <level>WARN</level>
776                                 </requireReleaseDeps>
777                             </rules>
778                         </configuration>
779                     </execution>
780                     <execution>
781                         <id>enforce-maven</id>
782                         <goals>
783                             <goal>enforce</goal>
784                         </goals>
785                         <configuration>
786                             <rules>
787                                 <requireJavaVersion>
788                                     <version>1.8.0</version>
789                                 </requireJavaVersion>
790                                 <requireMavenVersion>
791                                     <version>[3.5.0,)</version>
792                                 </requireMavenVersion>
793                             </rules>
794                         </configuration>
795                     </execution>
796                     <execution>
797                         <id>enforce-banned-dependencies</id>
798                         <goals>
799                             <goal>enforce</goal>
800                         </goals>
801                         <configuration>
802                             <rules>
803                                 <bannedDependencies>
804                                     <message>Please always use mockito-core instead of mockito-all (see https://bugs.opendaylight.org/show_bug.cgi?id=7662), and spotbugs:annotations instead of findbugs:annotations</message>
805                                     <excludes>
806                                         <exclude>org.mockito:mockito-all</exclude>
807 <!--                                         <exclude>com.google.code.findbugs:annotations</exclude> -->
808                                     </excludes>
809                                 </bannedDependencies>
810                             </rules>
811                             <fail>true</fail>
812                         </configuration>
813                     </execution>
814                 </executions>
815             </plugin>
816         </plugins>
817     </build>
818
819     <reporting>
820         <plugins>
821             <plugin>
822                 <artifactId>maven-javadoc-plugin</artifactId>
823                 <configuration>
824                     <failOnError>false</failOnError>
825                     <additionalparam>-Xdoclint:none</additionalparam>
826                 </configuration>
827             </plugin>
828         </plugins>
829     </reporting>
830
831     <profiles>
832         <!-- Profiles from ONAP oparent -->
833         <profile>
834             <id>generate-json</id>
835             <activation>
836                 <file>
837                     <exists>${swagger-properties}</exists>
838                 </file>
839                 <property>
840                     <name>swagger-sdk.generate-json</name>
841                 </property>
842             </activation>
843             <build>
844                 <plugins>
845                     <plugin>
846                         <groupId>org.codehaus.mojo</groupId>
847                         <artifactId>properties-maven-plugin</artifactId>
848                         <version>1.0.0</version>
849                         <executions>
850                             <execution>
851                                 <phase>initialize</phase>
852                                 <goals>
853                                     <goal>read-project-properties</goal>
854                                 </goals>
855                                 <configuration>
856                                     <files>
857                                         <file>${basedir}/src/main/resources/swagger.properties</file>
858                                     </files>
859                                 </configuration>
860                             </execution>
861                         </executions>
862                     </plugin>
863                     <plugin>
864                         <groupId>com.github.kongchen</groupId>
865                         <artifactId>swagger-maven-plugin</artifactId>
866                         <version>3.1.4</version>
867                         <configuration>
868                             <apiSources>
869                                 <apiSource>
870                                     <locations>${api-rest-package}</locations>
871                                     <schemes>http,https</schemes>
872                                     <host>${api-host-ip}:${api-host-port}</host>
873                                     <basePath>${api-base-path}</basePath>
874                                     <info>
875                                         <title>${api-title}</title>
876                                         <version>${api-version}</version>
877                                         <description>${api-description}</description>
878                                         <license>
879                                             <name>${api-license}</name>
880                                         </license>
881                                     </info>
882                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
883                                 </apiSource>
884                             </apiSources>
885                         </configuration>
886                         <executions>
887                             <execution>
888                                 <phase>compile</phase>
889                                 <goals>
890                                     <goal>generate</goal>
891                                 </goals>
892                             </execution>
893                         </executions>
894                     </plugin>
895                     <plugin>
896                         <groupId>org.apache.maven.plugins</groupId>
897                         <artifactId>maven-install-plugin</artifactId>
898                         <version>2.3.1</version>
899                         <executions>
900                             <execution>
901                                 <id>install-file-id</id>
902                                 <phase>install</phase>
903                                 <goals>
904                                     <goal>install-file</goal>
905                                 </goals>
906                                 <configuration>
907                                     <file>${basedir}/src/main/resources/swagger.json</file>
908                                     <groupId>${project.groupId}</groupId>
909                                     <artifactId>${project.artifactId}-swagger-schema</artifactId>
910                                     <version>${project.version}</version>
911                                     <packaging>json</packaging>
912                                 </configuration>
913                             </execution>
914                         </executions>
915                     </plugin>
916                 </plugins>
917             </build>
918         </profile>
919         <profile>
920             <id>generate-sdk</id>
921             <activation>
922                 <file>
923                     <exists>${swagger-json}</exists>
924                 </file>
925                 <property>
926                     <name>swagger-sdk.generate-java-sdk</name>
927                 </property>
928             </activation>
929             <build>
930                 <plugins>
931                     <plugin>
932                         <groupId>org.apache.maven.plugins</groupId>
933                         <artifactId>maven-antrun-plugin</artifactId>
934                         <version>1.8</version>
935                         <executions>
936                             <execution>
937                                 <phase>initialize</phase>
938                                 <id>ant-create-script</id>
939                                 <configuration>
940                                     <exportAntProperties>true</exportAntProperties>
941                                     <tasks>
942                                         <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
943                                         <condition property="is_windows" value="true">
944                                             <os family="windows"/>
945                                         </condition>
946                                         <condition property="isLinux" value="true">
947                                             <os family="unix"/>
948                                         </condition>
949                                         <if>
950                                             <equals arg1="${is_windows}" arg2="true"/>
951                                             <then>
952                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
953                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true"
954                                                   message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
955                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true"
956                                                   message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
957                                             </then>
958                                             <else>
959                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
960                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true"
961                                                   message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
962                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true"
963                                                   message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
964                                                 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
965                                             </else>
966                                         </if>
967                                     </tasks>
968                                 </configuration>
969                                 <goals>
970                                     <goal>run</goal>
971                                 </goals>
972                             </execution>
973                         </executions>
974                         <dependencies>
975                             <dependency>
976                                 <groupId>ant-contrib</groupId>
977                                 <artifactId>ant-contrib</artifactId>
978                                 <version>1.0b3</version>
979                                 <exclusions>
980                                     <exclusion>
981                                         <groupId>ant</groupId>
982                                         <artifactId>ant</artifactId>
983                                     </exclusion>
984                                 </exclusions>
985                             </dependency>
986                         </dependencies>
987                     </plugin>
988                     <plugin>
989                         <groupId>io.swagger</groupId>
990                         <artifactId>swagger-codegen-maven-plugin</artifactId>
991                         <version>2.2.1</version>
992                         <executions>
993                             <execution>
994                                 <goals>
995                                     <goal>generate</goal>
996                                 </goals>
997                                 <configuration>
998                                     <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
999                                     <output>${project.build.directory}/generated-sources</output>
1000                                     <language>java</language>
1001                                     <configOptions>
1002                                         <dateLibrary>joda</dateLibrary>
1003                                     </configOptions>
1004                                     <library>jersey2</library>
1005                                     <groupId>${project.groupId}</groupId>
1006                                     <artifactId>${project.artifactId}-java-sdk</artifactId>
1007                                     <artifactVersion>${project.version}</artifactVersion>
1008                                     <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
1009                                     <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
1010                                     <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
1011                                 </configuration>
1012                             </execution>
1013                         </executions>
1014                     </plugin>
1015                     <plugin>
1016                         <groupId>org.codehaus.mojo</groupId>
1017                         <artifactId>exec-maven-plugin</artifactId>
1018                         <version>1.5.0</version>
1019                         <executions>
1020                             <execution>
1021                                 <id>swagger-generate-sources</id>
1022                                 <phase>generate-sources</phase>
1023                                 <goals>
1024                                     <goal>exec</goal>
1025                                 </goals>
1026                                 <configuration>
1027                                     <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
1028                                 </configuration>
1029                             </execution>
1030                         </executions>
1031                     </plugin>
1032                     <plugin>
1033                         <groupId>org.apache.maven.plugins</groupId>
1034                         <artifactId>maven-clean-plugin</artifactId>
1035                         <version>3.0.0</version>
1036                         <executions>
1037                             <execution>
1038                                 <id>clean-generated-files</id>
1039                                 <phase>generate-sources</phase>
1040                                 <goals>
1041                                     <goal>clean</goal>
1042                                 </goals>
1043                                 <configuration>
1044                                     <filesets>
1045                                         <fileset>
1046                                             <directory>${project.build.directory}/generated-sources</directory>
1047                                         </fileset>
1048                                     </filesets>
1049                                 </configuration>
1050                             </execution>
1051                         </executions>
1052                     </plugin>
1053                 </plugins>
1054             </build>
1055             <dependencies>
1056                 <dependency>
1057                     <groupId>org.onap.msb.swagger-sdk</groupId>
1058                     <artifactId>swagger-sdk</artifactId>
1059                     <version>1.0.0</version>
1060                 </dependency>
1061             </dependencies>
1062         </profile>
1063         <profile>
1064             <id>sonar-jacoco-aggregate</id>
1065             <activation>
1066                 <property>
1067                     <name>onap.jacoco.aggregateFile</name>
1068                 </property>
1069             </activation>
1070             <build>
1071                 <plugins>
1072                     <plugin>
1073                         <groupId>org.jacoco</groupId>
1074                         <artifactId>jacoco-maven-plugin</artifactId>
1075                         <executions>
1076                             <execution>
1077                                 <id>merge</id>
1078                                 <goals>
1079                                     <goal>merge</goal>
1080                                 </goals>
1081                                 <phase>generate-resources</phase>
1082                                 <configuration>
1083                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
1084                                     <fileSets>
1085                                         <fileSet>
1086                                             <directory>${project.basedir}</directory>
1087                                             <includes>
1088                                                 <include>**/target/code-coverage/*.exec</include>
1089                                             </includes>
1090                                         </fileSet>
1091                                     </fileSets>
1092                                 </configuration>
1093                             </execution>
1094                         </executions>
1095                     </plugin>
1096                 </plugins>
1097             </build>
1098         </profile>
1099         <!-- End of profiles from ONAP oparent -->
1100
1101         <profile>
1102             <id>yang-compile</id>
1103             <activation>
1104                 <file>
1105                     <exists>src/main/yang</exists>
1106                 </file>
1107             </activation>
1108             <build>
1109                 <plugins>
1110                     <plugin>
1111                         <groupId>org.opendaylight.yangtools</groupId>
1112                         <artifactId>yang-maven-plugin</artifactId>
1113                         <version>3.0.11</version>
1114                         <dependencies>
1115                             <dependency>
1116                                 <groupId>org.opendaylight.mdsal</groupId>
1117                                 <artifactId>maven-sal-api-gen-plugin</artifactId>
1118                                 <version>${odl.mdsal.model.version}</version>
1119                                 <type>jar</type>
1120                                 <scope>compile</scope>
1121                             </dependency>
1122                             <dependency>
1123                                 <groupId>org.opendaylight.netconf</groupId>
1124                                 <artifactId>sal-rest-docgen-maven</artifactId>
1125                                 <version>${odl.netconf.sal.rest.docgen.version}</version>
1126                                 <type>jar</type>
1127                             </dependency>
1128                         </dependencies>
1129                         <executions>
1130                             <execution>
1131                                 <id>binding</id>
1132                                 <goals>
1133                                     <goal>generate-sources</goal>
1134                                 </goals>
1135                                 <configuration>
1136                                     <yangFilesRootDir>${yang.file.directory}</yangFilesRootDir>
1137                                     <codeGenerators>
1138                                         <generator>
1139                                             <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
1140                                             <outputBaseDir>${salGeneratorPath}</outputBaseDir>
1141                                         </generator>
1142                                         <generator>
1143                                             <codeGeneratorClass>org.opendaylight.netconf.sal.rest.doc.maven.StaticDocGenerator</codeGeneratorClass>
1144                                             <outputBaseDir>target/swagger</outputBaseDir>
1145                                         </generator>
1146                                     </codeGenerators>
1147                                     <inspectDependencies>true</inspectDependencies>
1148                                 </configuration>
1149                             </execution>
1150                         </executions>
1151                     </plugin>
1152                 </plugins>
1153             </build>
1154         </profile>
1155     </profiles>
1156 </project>