Adding deployeAtEnd true to maven-deploy-plugin
[ccsdk/parent.git] / odlparent / binding-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.mdsal</groupId>
10         <artifactId>binding-parent</artifactId>
11         <version>4.0.17</version>
12         <relativePath/>
13     </parent>
14
15     <groupId>org.onap.ccsdk.parent</groupId>
16     <artifactId>binding-parent</artifactId>
17     <version>2.1.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.1.1-SNAPSHOT</ccsdk.cds.version>
100         <ccsdk.features.version>1.1.1-SNAPSHOT</ccsdk.features.version>
101         <ccsdk.distribution.version>1.1.1-SNAPSHOT</ccsdk.distribution.version>
102         <ccsdk.sli.version>1.2.0-SNAPSHOT</ccsdk.sli.version>
103         <ccsdk.sli.core.version>${ccsdk.sli.version}</ccsdk.sli.core.version>
104         <ccsdk.sli.adaptors.version>${ccsdk.sli.version}</ccsdk.sli.adaptors.version>
105         <ccsdk.sli.northbound.version>${ccsdk.sli.version}</ccsdk.sli.northbound.version>
106         <ccsdk.sli.plugins.version>${ccsdk.sli.version}</ccsdk.sli.plugins.version>
107         <sdnctl.aai.service.version>${ccsdk.sli.version}</sdnctl.aai.service.version>
108         <sdnctl.dblib.version>${ccsdk.sli.version}</sdnctl.dblib.version>
109         <sdnctl.mdsal.resource.version>${ccsdk.sli.version}</sdnctl.mdsal.resource.version>
110         <sdnctl.slipluginutils.version>${ccsdk.sli.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.1.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                         <deployAtEnd>true</deployAtEnd>
371                     </configuration>
372                 </plugin>
373                 <plugin>
374                     <groupId>org.apache.maven.plugins</groupId>
375                     <artifactId>maven-site-plugin</artifactId>
376                     <version>3.6</version>
377                     <dependencies>
378                         <dependency>
379                             <groupId>org.apache.maven.wagon</groupId>
380                             <artifactId>wagon-webdav-jackrabbit</artifactId>
381                             <version>2.10</version>
382                         </dependency>
383                     </dependencies>
384                 </plugin>
385                 <plugin>
386                     <groupId>org.apache.maven.plugins</groupId>
387                     <artifactId>maven-enforcer-plugin</artifactId>
388                     <version>3.0.0-M2</version>
389                     <executions>
390                         <execution>
391                             <id>enforce-property</id>
392                             <goals>
393                                 <goal>enforce</goal>
394                             </goals>
395                             <configuration>
396                                 <rules>
397                                     <requireProperty>
398                                         <property>onap.nexus.url</property>
399                                         <message>You must set a onap.nexus.url property in your
400                                             ~/.m2/settings.xml. See oparent/settings.xml for an example.
401                                         </message>
402                                     </requireProperty>
403                                 </rules>
404                                 <fail>true</fail>
405                             </configuration>
406                         </execution>
407                         <execution>
408                             <id>enforce-no-snapshots</id>
409                             <goals>
410                                 <goal>enforce</goal>
411                             </goals>
412                             <configuration>
413                                 <rules>
414                                     <requireReleaseDeps>
415                                         <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
416                                         <onlyWhenRelease>true</onlyWhenRelease>
417                                         <level>WARN</level>
418                                     </requireReleaseDeps>
419                                 </rules>
420                             </configuration>
421                         </execution>
422                         <execution>
423                             <id>enforce-maven</id>
424                             <goals>
425                             <goal>enforce</goal>
426                             </goals>
427                             <configuration>
428                             <rules>
429                                 <requireJavaVersion>
430                                 <version>8</version>
431                                 </requireJavaVersion>
432                                 <requireMavenVersion>
433                                 <version>[3.5.0,)</version>
434                                 </requireMavenVersion>
435                             </rules>
436                             </configuration>
437                         </execution>
438                         <execution>
439                             <id>enforce-banned-dependencies</id>
440                             <goals>
441                             <goal>enforce</goal>
442                             </goals>
443                             <configuration>
444                             <rules>
445                                 <bannedDependencies>
446                                 <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>
447                                 <excludes>
448                                     <exclude>org.mockito:mockito-all</exclude>
449                 <!--                     <exclude>com.google.code.findbugs:annotations</exclude> -->
450                                 </excludes>
451                                 </bannedDependencies>
452                             </rules>
453                             <fail>true</fail>
454                             </configuration>
455                         </execution>
456                     </executions>
457                 </plugin>
458                 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
459                 <plugin>
460                     <groupId>org.sonarsource.scanner.maven</groupId>
461                     <artifactId>sonar-maven-plugin</artifactId>
462                     <version>${sonar.scanner.version}</version>
463                 </plugin>
464                 <!-- end of plugins from ONAP version (parent of oparent) -->
465
466                 <!-- Plugins from ONAP oparent -->
467                 <plugin>
468                     <groupId>org.apache.maven.plugins</groupId>
469                     <artifactId>maven-surefire-plugin</artifactId>
470                     <version>2.22.0</version>
471                     <configuration>
472                         <!-- Sets the VM argument line used when unit tests are run. -->
473                         <argLine>${surefireArgLine}</argLine>
474                         <!-- Excludes integration tests when unit tests are run. -->
475                         <excludes>
476                             <exclude>**/IT*.java</exclude>
477                         </excludes>
478                     </configuration>
479                 </plugin>
480                 <plugin>
481                     <groupId>org.apache.maven.plugins</groupId>
482                     <artifactId>maven-failsafe-plugin</artifactId>
483                     <version>2.22.0</version>
484                     <executions>
485                         <!-- Ensures that both integration-test and verify goals of the Failsafe
486                             Maven plugin are executed. -->
487                         <execution>
488                             <id>integration-tests</id>
489                             <goals>
490                                 <goal>integration-test</goal>
491                                 <goal>verify</goal>
492                             </goals>
493                             <configuration>
494                                 <!-- Sets the VM argument line used when integration tests are run. -->
495                                 <argLine>${failsafeArgLine}</argLine>
496                             </configuration>
497                         </execution>
498                     </executions>
499                 </plugin>
500
501                 <!-- End of plugins from ONAP oparent -->
502                 <plugin>
503                     <groupId>org.codehaus.mojo</groupId>
504                     <artifactId>properties-maven-plugin</artifactId>
505                     <version>1.0.0</version>
506                     <executions>
507                         <execution>
508                             <goals>
509                                 <goal>set-system-properties</goal>
510                             </goals>
511                             <configuration>
512                                 <properties>
513                                     <property>
514                                         <name>maven.wagon.http.ssl.allowall</name>
515                                         <value>${ssl.allowall}</value>
516                                     </property>
517                                     <property>
518                                         <name>maven.wagon.http.ssl.insecure</name>
519                                         <value>${ssl.insecure}</value>
520                                     </property>
521                                 </properties>
522                             </configuration>
523                         </execution>
524                     </executions>
525                 </plugin>
526
527                 <plugin>
528                     <groupId>org.codehaus.mojo</groupId>
529                     <artifactId>versions-maven-plugin</artifactId>
530                     <version>2.5</version>
531                     <configuration>
532                         <processAllModules>true</processAllModules>
533                     </configuration>
534                 </plugin>
535                 <plugin>
536                     <artifactId>maven-scm-plugin</artifactId>
537                     <version>1.8.1</version>
538                     <configuration>
539                         <tag>${project.artifactId}-${project.version}</tag>
540                     </configuration>
541                 </plugin>
542                 <plugin>
543                     <groupId>com.github.ferstl</groupId>
544                     <artifactId>depgraph-maven-plugin</artifactId>
545                     <version>3.3.0</version>
546                     <configuration>
547                         <graphFormat>text</graphFormat>
548                         <outputFileName>${dependency-list.file}</outputFileName>
549                         <outputDirectory>${project.basedir}</outputDirectory>
550                         <transitiveExcludes>*</transitiveExcludes>
551                         <showVersions>true</showVersions>
552                         <showGroupIds>true</showGroupIds>
553                     </configuration>
554                 </plugin>
555                 <plugin>
556                     <groupId>de.jacks-it-lab</groupId>
557                     <artifactId>frontend-maven-plugin</artifactId>
558                     <version>1.7.2</version>
559                 </plugin>
560                 <plugin>
561                     <groupId>com.github.alexcojocaru</groupId>
562                     <artifactId>elasticsearch-maven-plugin</artifactId>
563                     <version>6.16</version>
564                     <configuration>
565                         <version>7.1.1</version>
566                     </configuration>
567                 </plugin>
568                 <plugin>
569                     <groupId>org.apache.maven.plugins</groupId>
570                     <artifactId>maven-javadoc-plugin</artifactId>
571                     <version>3.2.0</version>
572                     <configuration>
573                         <failOnError>false</failOnError>
574                     </configuration>
575                 </plugin>
576             </plugins>
577         </pluginManagement>
578         <plugins>
579
580             <!-- Plugins from oparent version (parent of oparent) -->
581             <plugin>
582                 <groupId>org.apache.maven.plugins</groupId>
583                 <artifactId>maven-deploy-plugin</artifactId>
584             </plugin>
585             <plugin>
586                 <groupId>org.apache.maven.plugins</groupId>
587                 <artifactId>maven-site-plugin</artifactId>
588             </plugin>
589             <!-- end of plugins from oparent version (parent of oparent) -->
590
591             <!-- Plugins from oparent -->
592             <plugin>
593                 <artifactId>maven-checkstyle-plugin</artifactId>
594                 <version>2.17</version>
595                 <dependencies>
596                     <dependency>
597                         <groupId>org.onap.oparent</groupId>
598                         <artifactId>checkstyle</artifactId>
599                         <version>1.2.2</version>
600                     </dependency>
601                 </dependencies>
602                 <executions>
603                     <execution>
604                         <id>onap-license</id>
605                         <goals>
606                             <goal>check</goal>
607                         </goals>
608                         <phase>process-sources</phase>
609                         <configuration>
610                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
611                             <includeResources>false</includeResources>
612                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
613                             <includeTestResources>false</includeTestResources>
614                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
615                             <excludes>
616                             </excludes>
617                             <consoleOutput>true</consoleOutput>
618                             <failOnViolation>false</failOnViolation>
619                         </configuration>
620                     </execution>
621                     <execution>
622                         <id>onap-java-style</id>
623                         <goals>
624                             <goal>check</goal>
625                         </goals>
626                         <phase>process-sources</phase>
627                         <configuration>
628                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
629                                 with minor changes -->
630                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
631                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
632                             <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
633                             <includeResources>true</includeResources>
634                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
635                             <includeTestResources>true</includeTestResources>
636                             <excludes>
637                             </excludes>
638                             <consoleOutput>true</consoleOutput>
639                             <failOnViolation>false</failOnViolation>
640                         </configuration>
641                     </execution>
642                 </executions>
643             </plugin>
644             <plugin>
645                 <groupId>org.codehaus.mojo</groupId>
646                 <artifactId>build-helper-maven-plugin</artifactId>
647                 <version>1.12</version>
648             </plugin>
649             <!-- Jacoco / Sonar -->
650             <plugin>
651                 <groupId>org.jacoco</groupId>
652                 <artifactId>jacoco-maven-plugin</artifactId>
653                 <version>${jacoco.version}</version>
654                 <executions>
655                     <execution>
656                         <id>pre-unit-test</id>
657                         <goals>
658                             <goal>prepare-agent</goal>
659                         </goals>
660                         <configuration>
661                             <!-- Sets the path to the file which contains the execution data. -->
662                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
663                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
664                             <propertyName>surefireArgLine</propertyName>
665                         </configuration>
666                     </execution>
667                     <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
668                     <execution>
669                         <id>post-unit-test</id>
670                         <phase>test</phase>
671                         <goals>
672                             <goal>report</goal>
673                         </goals>
674                         <configuration>
675                             <!-- Sets the path to the file which contains the execution data. -->
676                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
677                             <!-- Sets the output directory for the code coverage report. -->
678                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
679                         </configuration>
680                     </execution>
681                     <execution>
682                         <id>pre-integration-test</id>
683                         <phase>pre-integration-test</phase>
684                         <goals>
685                             <goal>prepare-agent</goal>
686                         </goals>
687                         <configuration>
688                             <!-- Sets the path to the file which contains the execution data. -->
689                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
690                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
691                             <propertyName>failsafeArgLine</propertyName>
692                         </configuration>
693                     </execution>
694                     <!-- Ensures that the code coverage report for integration tests after integration tests have been run. -->
695                     <execution>
696                         <id>post-integration-test</id>
697                         <phase>post-integration-test</phase>
698                         <goals>
699                             <goal>report</goal>
700                         </goals>
701                         <configuration>
702                             <!-- Sets the path to the file which contains the execution data. -->
703                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
704                             <!-- Sets the output directory for the code coverage report. -->
705                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
706                         </configuration>
707                     </execution>
708                     <execution>
709                         <id>default-prepare-agent</id>
710                         <goals>
711                             <goal>prepare-agent</goal>
712                         </goals>
713                     </execution>
714                     <execution>
715                         <id>default-report</id>
716                         <phase>prepare-package</phase>
717                         <goals>
718                             <goal>report</goal>
719                         </goals>
720                     </execution>
721                     <execution>
722                         <id>default-check</id>
723                         <goals>
724                             <goal>check</goal>
725                         </goals>
726                         <configuration>
727                             <rules>
728                                 <rule>
729                                     <element>PACKAGE</element>
730                                     <limits>
731                                         <limit>
732                                             <counter>COMPLEXITY</counter>
733                                             <value>COVEREDRATIO</value>
734                                             <minimum>0.0</minimum>
735                                         </limit>
736                                     </limits>
737                                 </rule>
738                             </rules>
739                         </configuration>
740                     </execution>
741                 </executions>
742             </plugin>
743             <plugin>
744                 <groupId>org.apache.maven.plugins</groupId>
745                 <artifactId>maven-surefire-plugin</artifactId>
746             </plugin>
747             <plugin>
748                 <groupId>org.apache.maven.plugins</groupId>
749                 <artifactId>maven-failsafe-plugin</artifactId>
750             </plugin>
751             <!-- end of plugins from oparent -->
752             <plugin>
753                 <groupId>org.apache.maven.plugins</groupId>
754                 <artifactId>maven-javadoc-plugin</artifactId>
755                 <executions>
756                     <execution>
757                         <id>attach-javadocs</id>
758                         <goals>
759                             <goal>jar</goal>
760                         </goals>
761                         <configuration>
762                             <additionalparam>-Xdoclint:none</additionalparam>
763                         </configuration>
764                     </execution>
765                 </executions>
766             </plugin>
767             <plugin>
768                 <artifactId>maven-enforcer-plugin</artifactId>
769                 <version>3.0.0-M2</version>
770                 <executions>
771                     <execution>
772                         <id>enforce-property</id>
773                         <goals>
774                             <goal>enforce</goal>
775                         </goals>
776                         <configuration>
777                             <rules>
778                                 <requireProperty>
779                                     <property>onap.nexus.url</property>
780                                     <message>You must set a onap.nexus.url property in your
781                                         ~/.m2/settings.xml. See oparent/settings.xml for an example.</message>
782                                 </requireProperty>
783                             </rules>
784                             <fail>true</fail>
785                         </configuration>
786                     </execution>
787                     <execution>
788                         <id>enforce-no-snapshots</id>
789                         <goals>
790                             <goal>enforce</goal>
791                         </goals>
792                         <configuration>
793                             <rules>
794                                 <requireReleaseDeps>
795                                     <failWhenParentIsSnapshot>false</failWhenParentIsSnapshot>
796                                     <onlyWhenRelease>true</onlyWhenRelease>
797                                     <level>WARN</level>
798                                 </requireReleaseDeps>
799                             </rules>
800                         </configuration>
801                     </execution>
802                     <execution>
803                         <id>enforce-maven</id>
804                         <goals>
805                             <goal>enforce</goal>
806                         </goals>
807                         <configuration>
808                             <rules>
809                                 <requireJavaVersion>
810                                     <version>1.8.0</version>
811                                 </requireJavaVersion>
812                                 <requireMavenVersion>
813                                     <version>[3.5.0,)</version>
814                                 </requireMavenVersion>
815                             </rules>
816                         </configuration>
817                     </execution>
818                     <execution>
819                         <id>enforce-banned-dependencies</id>
820                         <goals>
821                             <goal>enforce</goal>
822                         </goals>
823                         <configuration>
824                             <rules>
825                                 <bannedDependencies>
826                                     <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>
827                                     <excludes>
828                                         <exclude>org.mockito:mockito-all</exclude>
829                                         <!-- <exclude>com.google.code.findbugs:annotations</exclude> -->
830                                     </excludes>
831                                 </bannedDependencies>
832                             </rules>
833                             <fail>true</fail>
834                         </configuration>
835                     </execution>
836                 </executions>
837             </plugin>
838             <plugin>
839                 <groupId>pl.project13.maven</groupId>
840                 <artifactId>git-commit-id-plugin</artifactId>
841                 <version>4.0.0</version>
842                 <configuration>
843                     <commitIdGenerationMode>full</commitIdGenerationMode>
844                     <includeOnlyProperties>
845                         <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
846                         <includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
847                     </includeOnlyProperties>
848                 </configuration>
849             </plugin>
850         </plugins>
851     </build>
852
853     <reporting>
854         <plugins>
855             <plugin>
856                 <artifactId>maven-javadoc-plugin</artifactId>
857                 <configuration>
858                     <failOnError>false</failOnError>
859                     <additionalparam>-Xdoclint:none</additionalparam>
860                 </configuration>
861             </plugin>
862         </plugins>
863     </reporting>
864
865     <profiles>
866         <!-- Profiles from ONAP oparent -->
867         <profile>
868             <id>generate-json</id>
869             <activation>
870                 <file>
871                     <exists>${swagger-properties}</exists>
872                 </file>
873                 <property>
874                     <name>swagger-sdk.generate-json</name>
875                 </property>
876             </activation>
877             <build>
878                 <plugins>
879                     <plugin>
880                         <groupId>org.codehaus.mojo</groupId>
881                         <artifactId>properties-maven-plugin</artifactId>
882                         <version>1.0.0</version>
883                         <executions>
884                             <execution>
885                                 <phase>initialize</phase>
886                                 <goals>
887                                     <goal>read-project-properties</goal>
888                                 </goals>
889                                 <configuration>
890                                     <files>
891                                         <file>${basedir}/src/main/resources/swagger.properties</file>
892                                     </files>
893                                 </configuration>
894                             </execution>
895                         </executions>
896                     </plugin>
897                     <plugin>
898                         <groupId>com.github.kongchen</groupId>
899                         <artifactId>swagger-maven-plugin</artifactId>
900                         <version>3.1.4</version>
901                         <configuration>
902                             <apiSources>
903                                 <apiSource>
904                                     <locations>${api-rest-package}</locations>
905                                     <schemes>http,https</schemes>
906                                     <host>${api-host-ip}:${api-host-port}</host>
907                                     <basePath>${api-base-path}</basePath>
908                                     <info>
909                                         <title>${api-title}</title>
910                                         <version>${api-version}</version>
911                                         <description>${api-description}</description>
912                                         <license>
913                                             <name>${api-license}</name>
914                                         </license>
915                                     </info>
916                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
917                                 </apiSource>
918                             </apiSources>
919                         </configuration>
920                         <executions>
921                             <execution>
922                                 <phase>compile</phase>
923                                 <goals>
924                                     <goal>generate</goal>
925                                 </goals>
926                             </execution>
927                         </executions>
928                     </plugin>
929                     <plugin>
930                         <groupId>org.apache.maven.plugins</groupId>
931                         <artifactId>maven-install-plugin</artifactId>
932                         <version>2.3.1</version>
933                         <executions>
934                             <execution>
935                                 <id>install-file-id</id>
936                                 <phase>install</phase>
937                                 <goals>
938                                     <goal>install-file</goal>
939                                 </goals>
940                                 <configuration>
941                                     <file>${basedir}/src/main/resources/swagger.json</file>
942                                     <groupId>${project.groupId}</groupId>
943                                     <artifactId>${project.artifactId}-swagger-schema</artifactId>
944                                     <version>${project.version}</version>
945                                     <packaging>json</packaging>
946                                 </configuration>
947                             </execution>
948                         </executions>
949                     </plugin>
950                 </plugins>
951             </build>
952         </profile>
953         <profile>
954             <id>generate-sdk</id>
955             <activation>
956                 <file>
957                     <exists>${swagger-json}</exists>
958                 </file>
959                 <property>
960                     <name>swagger-sdk.generate-java-sdk</name>
961                 </property>
962             </activation>
963             <build>
964                 <plugins>
965                     <plugin>
966                         <groupId>org.apache.maven.plugins</groupId>
967                         <artifactId>maven-antrun-plugin</artifactId>
968                         <version>1.8</version>
969                         <executions>
970                             <execution>
971                                 <phase>initialize</phase>
972                                 <id>ant-create-script</id>
973                                 <configuration>
974                                     <exportAntProperties>true</exportAntProperties>
975                                     <tasks>
976                                         <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
977                                         <condition property="is_windows" value="true">
978                                             <os family="windows"/>
979                                         </condition>
980                                         <condition property="isLinux" value="true">
981                                             <os family="unix"/>
982                                         </condition>
983                                         <if>
984                                             <equals arg1="${is_windows}" arg2="true"/>
985                                             <then>
986                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
987                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true"
988                                                   message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
989                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true"
990                                                   message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
991                                             </then>
992                                             <else>
993                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
994                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true"
995                                                   message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
996                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true"
997                                                   message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
998                                                 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
999                                             </else>
1000                                         </if>
1001                                     </tasks>
1002                                 </configuration>
1003                                 <goals>
1004                                     <goal>run</goal>
1005                                 </goals>
1006                             </execution>
1007                         </executions>
1008                         <dependencies>
1009                             <dependency>
1010                                 <groupId>ant-contrib</groupId>
1011                                 <artifactId>ant-contrib</artifactId>
1012                                 <version>1.0b3</version>
1013                                 <exclusions>
1014                                     <exclusion>
1015                                         <groupId>ant</groupId>
1016                                         <artifactId>ant</artifactId>
1017                                     </exclusion>
1018                                 </exclusions>
1019                             </dependency>
1020                         </dependencies>
1021                     </plugin>
1022                     <plugin>
1023                         <groupId>io.swagger</groupId>
1024                         <artifactId>swagger-codegen-maven-plugin</artifactId>
1025                         <version>2.2.1</version>
1026                         <executions>
1027                             <execution>
1028                                 <goals>
1029                                     <goal>generate</goal>
1030                                 </goals>
1031                                 <configuration>
1032                                     <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
1033                                     <output>${project.build.directory}/generated-sources</output>
1034                                     <language>java</language>
1035                                     <configOptions>
1036                                         <dateLibrary>joda</dateLibrary>
1037                                     </configOptions>
1038                                     <library>jersey2</library>
1039                                     <groupId>${project.groupId}</groupId>
1040                                     <artifactId>${project.artifactId}-java-sdk</artifactId>
1041                                     <artifactVersion>${project.version}</artifactVersion>
1042                                     <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
1043                                     <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
1044                                     <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
1045                                 </configuration>
1046                             </execution>
1047                         </executions>
1048                     </plugin>
1049                     <plugin>
1050                         <groupId>org.codehaus.mojo</groupId>
1051                         <artifactId>exec-maven-plugin</artifactId>
1052                         <version>1.5.0</version>
1053                         <executions>
1054                             <execution>
1055                                 <id>swagger-generate-sources</id>
1056                                 <phase>generate-sources</phase>
1057                                 <goals>
1058                                     <goal>exec</goal>
1059                                 </goals>
1060                                 <configuration>
1061                                     <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
1062                                 </configuration>
1063                             </execution>
1064                         </executions>
1065                     </plugin>
1066                     <plugin>
1067                         <groupId>org.apache.maven.plugins</groupId>
1068                         <artifactId>maven-clean-plugin</artifactId>
1069                         <version>3.0.0</version>
1070                         <executions>
1071                             <execution>
1072                                 <id>clean-generated-files</id>
1073                                 <phase>generate-sources</phase>
1074                                 <goals>
1075                                     <goal>clean</goal>
1076                                 </goals>
1077                                 <configuration>
1078                                     <filesets>
1079                                         <fileset>
1080                                             <directory>${project.build.directory}/generated-sources</directory>
1081                                         </fileset>
1082                                     </filesets>
1083                                 </configuration>
1084                             </execution>
1085                         </executions>
1086                     </plugin>
1087                 </plugins>
1088             </build>
1089             <dependencies>
1090                 <dependency>
1091                     <groupId>org.onap.msb.swagger-sdk</groupId>
1092                     <artifactId>swagger-sdk</artifactId>
1093                     <version>1.0.0</version>
1094                 </dependency>
1095             </dependencies>
1096         </profile>
1097         <profile>
1098             <id>sonar-jacoco-aggregate</id>
1099             <activation>
1100                 <property>
1101                     <name>onap.jacoco.aggregateFile</name>
1102                 </property>
1103             </activation>
1104             <build>
1105                 <plugins>
1106                     <plugin>
1107                         <groupId>org.jacoco</groupId>
1108                         <artifactId>jacoco-maven-plugin</artifactId>
1109                         <executions>
1110                             <execution>
1111                                 <id>merge</id>
1112                                 <goals>
1113                                     <goal>merge</goal>
1114                                 </goals>
1115                                 <phase>generate-resources</phase>
1116                                 <configuration>
1117                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
1118                                     <fileSets>
1119                                         <fileSet>
1120                                             <directory>${project.basedir}</directory>
1121                                             <includes>
1122                                                 <include>**/target/code-coverage/*.exec</include>
1123                                             </includes>
1124                                         </fileSet>
1125                                     </fileSets>
1126                                 </configuration>
1127                             </execution>
1128                         </executions>
1129                     </plugin>
1130                 </plugins>
1131             </build>
1132         </profile>
1133         <!-- End of profiles from ONAP oparent -->
1134
1135         <profile>
1136             <id>yang-compile</id>
1137             <activation>
1138                 <file>
1139                     <exists>src/main/yang</exists>
1140                 </file>
1141             </activation>
1142             <build>
1143                 <plugins>
1144                     <plugin>
1145                         <groupId>org.opendaylight.yangtools</groupId>
1146                         <artifactId>yang-maven-plugin</artifactId>
1147                         <version>3.0.11</version>
1148                         <dependencies>
1149                             <dependency>
1150                                 <groupId>org.opendaylight.mdsal</groupId>
1151                                 <artifactId>maven-sal-api-gen-plugin</artifactId>
1152                                 <version>${odl.mdsal.model.version}</version>
1153                                 <type>jar</type>
1154                                 <scope>compile</scope>
1155                             </dependency>
1156                             <dependency>
1157                                 <groupId>org.opendaylight.netconf</groupId>
1158                                 <artifactId>sal-rest-docgen-maven</artifactId>
1159                                 <version>${odl.netconf.sal.rest.docgen.version}</version>
1160                                 <type>jar</type>
1161                             </dependency>
1162                         </dependencies>
1163                         <executions>
1164                             <execution>
1165                                 <id>binding</id>
1166                                 <goals>
1167                                     <goal>generate-sources</goal>
1168                                 </goals>
1169                                 <configuration>
1170                                     <yangFilesRootDir>${yang.file.directory}</yangFilesRootDir>
1171                                     <codeGenerators>
1172                                         <generator>
1173                                             <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
1174                                             <outputBaseDir>${salGeneratorPath}</outputBaseDir>
1175                                         </generator>
1176                                         <generator>
1177                                             <codeGeneratorClass>org.opendaylight.netconf.sal.rest.doc.maven.StaticDocGenerator</codeGeneratorClass>
1178                                             <outputBaseDir>target/swagger</outputBaseDir>
1179                                         </generator>
1180                                     </codeGenerators>
1181                                     <inspectDependencies>true</inspectDependencies>
1182                                 </configuration>
1183                             </execution>
1184                         </executions>
1185                     </plugin>
1186                 </plugins>
1187             </build>
1188         </profile>
1189     </profiles>
1190 </project>