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