Cleaning up springboot parent poms
[ccsdk/parent.git] / springboot / springboot1 / 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     <parent>
6         <groupId>org.springframework.boot</groupId>
7         <artifactId>spring-boot-starter-parent</artifactId>
8         <version>1.5.22.RELEASE</version>
9         <relativePath/>
10     </parent>
11
12     <groupId>org.onap.ccsdk.parent</groupId>
13     <artifactId>spring-boot-1-starter-parent</artifactId>
14     <version>1.5.2-SNAPSHOT</version>
15     <packaging>pom</packaging>
16
17     <name>ONAP :: ${project.groupId} :: ${project.artifactId}</name>
18     <description>Root POM to be used in place of odlparent for CCSDK based projects</description>
19     <url>http://wiki.onap.org</url>
20     <organization>
21         <name>ONAP</name>
22     </organization>
23
24     <issueManagement>
25         <system>JIRA</system>
26         <url>https://jira.onap.org/</url>
27     </issueManagement>
28     <distributionManagement>
29         <repository>
30             <id>ecomp-releases</id>
31             <url>https://nexus.onap.org/content/repositories/releases</url>
32         </repository>
33         <snapshotRepository>
34             <id>ecomp-snapshots</id>
35             <url>https://nexus.onap.org/content/repositories/snapshots</url>
36         </snapshotRepository>
37     </distributionManagement>
38
39     <properties>
40         <!-- Sonar properties -->
41         <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
42         <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
43         <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
44         <!-- Default Sonar configuration -->
45         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml,${project.reporting.outputDirectory}/jacoco-it/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
46         <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
47         <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
48
49         <!-- Jacoco properties -->
50         <jacoco.version>0.8.5</jacoco.version>
51         <!-- properties from oparent -->
52         <maven.compiler.source>1.8</maven.compiler.source>
53         <maven.compiler.target>1.8</maven.compiler.target>
54         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
55         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
56         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
57         <!-- sitePath may be overridden in the inheriting POM if desired -->
58         <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
59
60         <!-- If following file exist, auto-generation of swagger.json will be done -->
61         <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
62         <!-- If following file exist, auto-generation of sdk will be done -->
63         <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
64         <!-- end of properties from oparent -->
65
66         <!-- ONAP repositories -->
67         <onap.nexus.host>nexus.onap.org</onap.nexus.host>
68         <onap.nexus.port>443</onap.nexus.port>
69         <onap.nexus.protocol>https</onap.nexus.protocol>
70         <onap.nexus.public-url>https://nexus.onap.org/content/groups/public</onap.nexus.public-url>
71         <onap.nexus.staging-url>https://nexus.onap.org/content/groups/staging</onap.nexus.staging-url>
72         <onap.nexus.release-url>https://nexus.onap.org/content/repositories/releases</onap.nexus.release-url>
73         <onap.nexus.snapshot-url>https://nexus.onap.org/content/repositories/snapshots</onap.nexus.snapshot-url>
74         <onap.nexus.staging.server-id>ecomp-staging</onap.nexus.staging.server-id>
75         <onap.nexus.staging.profile-id>176c31dfe190a</onap.nexus.staging.profile-id>
76
77         <java.version.source>1.8</java.version.source>
78         <java.version.target>1.8</java.version.target>
79         <bundle.plugin.version>2.5.0</bundle.plugin.version>
80         <maven.compile.plugin.version>2.5.1</maven.compile.plugin.version>
81         <features.file>features.xml</features.file>
82         <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
83         <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
84         <checkstyle.skip>true</checkstyle.skip>
85
86         <!-- CCSDK component versions -->
87         <ccsdk.cds.version>0.7.1-SNAPSHOT</ccsdk.cds.version>
88         <ccsdk.sli.core.version>0.7.1-SNAPSHOT</ccsdk.sli.core.version>
89         <ccsdk.sli.adaptors.version>0.7.1-SNAPSHOT</ccsdk.sli.adaptors.version>
90         <ccsdk.sli.northbound.version>0.7.1-SNAPSHOT</ccsdk.sli.northbound.version>
91         <ccsdk.sli.plugins.version>0.7.1-SNAPSHOT</ccsdk.sli.plugins.version>
92         <ccsdk.distribution.version>0.7.1-SNAPSHOT</ccsdk.distribution.version>
93         <sdnctl.sli.version>${ccsdk.sli.core.version}</sdnctl.sli.version>
94         <sdnctl.aai.service.version>${ccsdk.sli.adaptors.version}</sdnctl.aai.service.version>
95         <sdnctl.dblib.version>${ccsdk.sli.core.version}</sdnctl.dblib.version>
96         <sdnctl.mdsal.resource.version>${ccsdk.sli.adaptors.version}</sdnctl.mdsal.resource.version>
97         <sdnctl.slipluginutils.version>${ccsdk.sli.core.version}</sdnctl.slipluginutils.version>
98
99         <!-- Managed dependency versions -->
100         <apache.httpcomponents.core.version>4.4.12</apache.httpcomponents.core.version>
101         <apache.httpcomponents.client.version>4.5.10</apache.httpcomponents.client.version>
102         <jersey.version>2.25.1</jersey.version>
103         <mariadb.connector.version>2.4.4</mariadb.connector.version>
104         <dependency-list.file>direct-dependencies.txt</dependency-list.file>
105     </properties>
106
107     <dependencyManagement>
108         <dependencies>
109             <dependency>
110                 <groupId>org.onap.ccsdk.parent</groupId>
111                 <artifactId>dependencies-bom</artifactId>
112                 <version>1.5.2-SNAPSHOT</version>
113                 <type>pom</type>
114                 <scope>import</scope>
115             </dependency>
116             <dependency>
117                 <groupId>org.onap.ccsdk.sli.core</groupId>
118                 <artifactId>sli-common</artifactId>
119                 <version>${ccsdk.sli.core.version}</version>
120             </dependency>
121
122             <dependency>
123                 <groupId>org.onap.ccsdk.sli.core</groupId>
124                 <artifactId>sli-provider</artifactId>
125                 <version>${ccsdk.sli.core.version}</version>
126             </dependency>
127             <dependency>
128                 <groupId>org.onap.ccsdk.sli.core</groupId>
129                 <artifactId>ccsdk-sli</artifactId>
130                 <version>${ccsdk.sli.core.version}</version>
131                 <type>xml</type>
132                 <classifier>features</classifier>
133             </dependency>
134             <dependency>
135                 <groupId>org.onap.ccsdk.sli.adaptors</groupId>
136                 <artifactId>aai-service-provider</artifactId>
137                 <version>${sdnctl.aai.service.version}</version>
138             </dependency>
139
140             <dependency>
141                 <groupId>org.onap.ccsdk.sli.core</groupId>
142                 <artifactId>dblib-provider</artifactId>
143                 <version>${sdnctl.dblib.version}</version>
144             </dependency>
145         </dependencies>
146
147     </dependencyManagement>
148
149     <repositories>
150         <repository>
151             <id>onap-public</id>
152             <url>https://nexus.onap.org/content/groups/public</url>
153             <releases>
154                 <enabled>true</enabled>
155                 <updatePolicy>never</updatePolicy>
156             </releases>
157             <snapshots>
158                 <enabled>true</enabled>
159                 <updatePolicy>always</updatePolicy>
160             </snapshots>
161         </repository>
162         <repository>
163             <id>onap-staging</id>
164             <url>https://nexus.onap.org/content/groups/staging</url>
165             <releases>
166                 <enabled>true</enabled>
167                 <updatePolicy>never</updatePolicy>
168             </releases>
169             <snapshots>
170                 <enabled>true</enabled>
171                 <updatePolicy>always</updatePolicy>
172             </snapshots>
173         </repository>
174         <repository>
175             <id>ecomp-release</id>
176             <name>onap-repository-releases</name>
177             <url>https://nexus.onap.org/content/repositories/releases</url>
178             <releases>
179                 <enabled>true</enabled>
180                 <updatePolicy>never</updatePolicy>
181             </releases>
182             <snapshots>
183                 <enabled>false</enabled>
184             </snapshots>
185         </repository>
186         <repository>
187             <id>ecomp-snapshot</id>
188             <name>onap-repository-snapshots</name>
189             <url>https://nexus.onap.org/content/repositories/snapshots</url>
190             <releases>
191                 <enabled>false</enabled>
192             </releases>
193             <snapshots>
194                 <enabled>true</enabled>
195             </snapshots>
196         </repository>
197     </repositories>
198     <pluginRepositories>
199         <pluginRepository>
200             <id>onap-public</id>
201             <url>${onap.nexus.public-url}</url>
202             <releases>
203                 <enabled>true</enabled>
204             </releases>
205             <snapshots>
206                 <enabled>true</enabled>
207             </snapshots>
208         </pluginRepository>
209         <pluginRepository>
210             <id>onap-staging</id>
211             <url>${onap.nexus.staging-url}</url>
212             <releases>
213                 <enabled>true</enabled>
214             </releases>
215             <snapshots>
216                 <enabled>true</enabled>
217             </snapshots>
218         </pluginRepository>
219         <pluginRepository>
220             <id>onap-snapshot</id>
221             <url>${onap.nexus.snapshot-url}</url>
222             <releases>
223                 <enabled>false</enabled>
224             </releases>
225             <snapshots>
226                 <enabled>true</enabled>
227             </snapshots>
228         </pluginRepository>
229         <!-- Black Duck plugin dependencies -->
230         <pluginRepository>
231             <id>JCenter</id>
232             <name>JCenter Repository</name>
233             <url>http://jcenter.bintray.com</url>
234         </pluginRepository>
235
236         <pluginRepository>
237             <id>Restlet</id>
238             <name>Restlet Repository</name>
239             <url>http://maven.restlet.com</url>
240         </pluginRepository>
241     </pluginRepositories>
242
243     <build>
244         <pluginManagement>
245             <plugins>
246                 <!-- Plugins from ONAP oparent -->
247                 <plugin>
248                     <groupId>org.apache.maven.plugins</groupId>
249                     <artifactId>maven-deploy-plugin</artifactId>
250                     <!-- This version supports the "deployAtEnd" parameter -->
251                     <version>2.8</version>
252                     <configuration>
253                         <skip/>
254                     </configuration>
255                 </plugin>
256                 <plugin>
257                     <groupId>org.apache.maven.plugins</groupId>
258                     <artifactId>maven-site-plugin</artifactId>
259                     <version>3.6</version>
260                     <dependencies>
261                         <dependency>
262                             <groupId>org.apache.maven.wagon</groupId>
263                             <artifactId>wagon-webdav-jackrabbit</artifactId>
264                             <version>2.10</version>
265                         </dependency>
266                     </dependencies>
267                 </plugin>
268                 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
269                 <plugin>
270                     <groupId>org.sonarsource.scanner.maven</groupId>
271                     <artifactId>sonar-maven-plugin</artifactId>
272                     <version>${sonar.scanner.version}</version>
273                 </plugin>
274                 <!-- end of plugins from ONAP version (parent of oparent) -->
275
276                 <plugin>
277                     <groupId>org.apache.maven.plugins</groupId>
278                     <artifactId>maven-surefire-plugin</artifactId>
279                     <version>2.22.0</version>
280                     <configuration>
281                         <!-- Sets the VM argument line used when unit tests are run. -->
282                         <argLine>${surefireArgLine}</argLine>
283                         <!-- Excludes integration tests when unit tests are run. -->
284                         <excludes>
285                             <exclude>**/IT*.java</exclude>
286                         </excludes>
287                     </configuration>
288                 </plugin>
289                 <plugin>
290                     <groupId>org.apache.maven.plugins</groupId>
291                     <artifactId>maven-failsafe-plugin</artifactId>
292                     <version>2.22.0</version>
293                     <executions>
294                         <!-- Ensures that both integration-test and verify goals of the Failsafe
295                             Maven plugin are executed. -->
296                         <execution>
297                             <id>integration-tests</id>
298                             <goals>
299                                 <goal>integration-test</goal>
300                                 <goal>verify</goal>
301                             </goals>
302                             <configuration>
303                                 <!-- Sets the VM argument line used when integration tests are run. -->
304                                 <argLine>${failsafeArgLine}</argLine>
305                             </configuration>
306                         </execution>
307                     </executions>
308                 </plugin>
309
310                 <!-- End of plugins from ONAP oparent -->
311                 <plugin>
312                     <groupId>org.codehaus.mojo</groupId>
313                     <artifactId>properties-maven-plugin</artifactId>
314                     <version>1.0.0</version>
315                     <executions>
316                         <execution>
317                             <goals>
318                                 <goal>set-system-properties</goal>
319                             </goals>
320                             <configuration>
321                                 <properties>
322                                     <property>
323                                         <name>maven.wagon.http.ssl.allowall</name>
324                                         <value>${ssl.allowall}</value>
325                                     </property>
326                                     <property>
327                                         <name>maven.wagon.http.ssl.insecure</name>
328                                         <value>${ssl.insecure}</value>
329                                     </property>
330                                 </properties>
331                             </configuration>
332                         </execution>
333                     </executions>
334                 </plugin>
335
336                 <plugin>
337                     <groupId>org.codehaus.mojo</groupId>
338                     <artifactId>versions-maven-plugin</artifactId>
339                     <version>2.5</version>
340                     <configuration>
341                         <processAllModules>true</processAllModules>
342                     </configuration>
343                 </plugin>
344                 <plugin>
345                     <artifactId>maven-scm-plugin</artifactId>
346                     <version>1.8.1</version>
347                     <configuration>
348                         <tag>${project.artifactId}-${project.version}</tag>
349                     </configuration>
350                 </plugin>
351                 <plugin>
352                     <groupId>com.github.ferstl</groupId>
353                     <artifactId>depgraph-maven-plugin</artifactId>
354                     <version>3.3.0</version>
355                     <configuration>
356                         <graphFormat>text</graphFormat>
357                         <outputFileName>${dependency-list.file}</outputFileName>
358                         <outputDirectory>${project.basedir}</outputDirectory>
359                         <transitiveExcludes>*</transitiveExcludes>
360                         <showVersions>true</showVersions>
361                         <showGroupIds>true</showGroupIds>
362                     </configuration>
363                 </plugin>
364             </plugins>
365         </pluginManagement>
366
367         <plugins>
368             <!-- Plugins from oparent version (parent of oparent) -->
369             <plugin>
370                 <groupId>org.apache.maven.plugins</groupId>
371                 <artifactId>maven-deploy-plugin</artifactId>
372             </plugin>
373             <plugin>
374                 <groupId>org.apache.maven.plugins</groupId>
375                 <artifactId>maven-site-plugin</artifactId>
376             </plugin>
377             <plugin>
378                 <groupId>org.apache.maven.plugins</groupId>
379                 <artifactId>maven-enforcer-plugin</artifactId>
380             </plugin>
381             <!-- end of plugins from oparent version (parent of oparent) -->
382
383             <!-- Plugins from oparent -->
384             <plugin>
385                 <artifactId>maven-checkstyle-plugin</artifactId>
386                 <version>2.17</version>
387                 <dependencies>
388                     <dependency>
389                         <groupId>org.onap.oparent</groupId>
390                         <artifactId>checkstyle</artifactId>
391                         <version>1.2.2</version>
392                     </dependency>
393                 </dependencies>
394                 <executions>
395                     <execution>
396                         <id>onap-license</id>
397                         <goals>
398                             <goal>check</goal>
399                         </goals>
400                         <phase>process-sources</phase>
401                         <configuration>
402                             <configLocation>onap-checkstyle/check-license.xml</configLocation>
403                             <includeResources>false</includeResources>
404                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
405                             <includeTestResources>false</includeTestResources>
406                             <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
407                             <excludes>
408                             </excludes>
409                             <consoleOutput>true</consoleOutput>
410                             <failOnViolation>false</failOnViolation>
411                         </configuration>
412                     </execution>
413                     <execution>
414                         <id>onap-java-style</id>
415                         <goals>
416                             <goal>check</goal>
417                         </goals>
418                         <phase>process-sources</phase>
419                         <configuration>
420                             <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
421                                 with minor changes -->
422                             <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
423                             <!-- <sourceDirectory> is needed so that checkstyle ignores the generated
424                                 sources directory -->
425                             <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
426                             <includeResources>true</includeResources>
427                             <includeTestSourceDirectory>true</includeTestSourceDirectory>
428                             <includeTestResources>true</includeTestResources>
429                             <excludes>
430                             </excludes>
431                             <consoleOutput>true</consoleOutput>
432                             <failOnViolation>false</failOnViolation>
433                         </configuration>
434                     </execution>
435                 </executions>
436             </plugin>
437             <plugin>
438                 <groupId>org.codehaus.mojo</groupId>
439                 <artifactId>build-helper-maven-plugin</artifactId>
440                 <version>1.12</version>
441             </plugin>
442             <!-- Jacoco / Sonar -->
443             <plugin>
444                 <groupId>org.jacoco</groupId>
445                 <artifactId>jacoco-maven-plugin</artifactId>
446                 <version>${jacoco.version}</version>
447                 <executions>
448                     <execution>
449                         <id>pre-unit-test</id>
450                         <goals>
451                             <goal>prepare-agent</goal>
452                         </goals>
453                         <configuration>
454                             <!-- Sets the path to the file which contains the execution data. -->
455                             <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
456                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
457                             <propertyName>surefireArgLine</propertyName>
458                         </configuration>
459                     </execution>
460                     <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
461                     <execution>
462                         <id>post-unit-test</id>
463                         <phase>test</phase>
464                         <goals>
465                             <goal>report</goal>
466                         </goals>
467                         <configuration>
468                             <!-- Sets the path to the file which contains the execution data. -->
469                             <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
470                             <!-- Sets the output directory for the code coverage report. -->
471                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
472                         </configuration>
473                     </execution>
474                     <execution>
475                         <id>pre-integration-test</id>
476                         <phase>pre-integration-test</phase>
477                         <goals>
478                             <goal>prepare-agent</goal>
479                         </goals>
480                         <configuration>
481                             <!-- Sets the path to the file which contains the execution data. -->
482                             <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
483                             <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
484                             <propertyName>failsafeArgLine</propertyName>
485                         </configuration>
486                     </execution>
487                     <!-- Ensures that the code coverage report for integration tests after integration tests have been run. -->
488                     <execution>
489                         <id>post-integration-test</id>
490                         <phase>post-integration-test</phase>
491                         <goals>
492                             <goal>report</goal>
493                         </goals>
494                         <configuration>
495                             <!-- Sets the path to the file which contains the execution data. -->
496                             <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
497                             <!-- Sets the output directory for the code coverage report. -->
498                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
499                         </configuration>
500                     </execution>
501                     <execution>
502                         <id>default-prepare-agent</id>
503                         <goals>
504                             <goal>prepare-agent</goal>
505                         </goals>
506                     </execution>
507                     <execution>
508                         <id>default-report</id>
509                         <phase>prepare-package</phase>
510                         <goals>
511                             <goal>report</goal>
512                         </goals>
513                     </execution>
514                     <execution>
515                         <id>default-check</id>
516                         <goals>
517                             <goal>check</goal>
518                         </goals>
519                         <configuration>
520                             <rules>
521                                 <rule>
522                                     <element>PACKAGE</element>
523                                     <limits>
524                                         <limit>
525                                             <counter>COMPLEXITY</counter>
526                                             <value>COVEREDRATIO</value>
527                                             <minimum>0.0</minimum>
528                                         </limit>
529                                     </limits>
530                                 </rule>
531                             </rules>
532                         </configuration>
533                     </execution>
534                 </executions>
535             </plugin>
536             <plugin>
537                 <groupId>org.apache.maven.plugins</groupId>
538                 <artifactId>maven-surefire-plugin</artifactId>
539             </plugin>
540             <plugin>
541                 <groupId>org.apache.maven.plugins</groupId>
542                 <artifactId>maven-failsafe-plugin</artifactId>
543             </plugin>
544             <!-- end of plugins from oparent -->
545             <plugin>
546                 <groupId>org.apache.maven.plugins</groupId>
547                 <artifactId>maven-javadoc-plugin</artifactId>
548                 <version>2.10.4</version>
549                 <executions>
550                     <execution>
551                         <id>attach-javadocs</id>
552                         <goals>
553                             <goal>jar</goal>
554                         </goals>
555                         <configuration>
556                             <additionalparam>-Xdoclint:none</additionalparam>
557                         </configuration>
558                     </execution>
559                 </executions>
560             </plugin>
561         </plugins>
562     </build>
563
564     <reporting>
565         <plugins>
566             <plugin>
567                 <artifactId>maven-javadoc-plugin</artifactId>
568                 <version>2.10.4</version>
569                 <configuration>
570                     <failOnError>false</failOnError>
571                     <additionalparam>-Xdoclint:none</additionalparam>
572                 </configuration>
573             </plugin>
574             <plugin>
575                 <groupId>org.jacoco</groupId>
576                 <artifactId>jacoco-maven-plugin</artifactId>
577                 <version>${jacoco.version}</version>
578                 <reportSets>
579                     <reportSet>
580                         <reports>
581                             <!-- select non-aggregate reports -->
582                             <report>report</report>
583                         </reports>
584                     </reportSet>
585                 </reportSets>
586             </plugin>
587         </plugins>
588     </reporting>
589
590     <profiles>
591         <!-- Profiles from ONAP oparent -->
592         <profile>
593             <id>generate-json</id>
594             <activation>
595                 <file>
596                     <exists>${swagger-properties}</exists>
597                 </file>
598                 <property>
599                     <name>swagger-sdk.generate-json</name>
600                 </property>
601             </activation>
602             <build>
603                 <plugins>
604                     <plugin>
605                         <groupId>org.codehaus.mojo</groupId>
606                         <artifactId>properties-maven-plugin</artifactId>
607                         <version>1.0.0</version>
608                         <executions>
609                             <execution>
610                                 <phase>initialize</phase>
611                                 <goals>
612                                     <goal>read-project-properties</goal>
613                                 </goals>
614                                 <configuration>
615                                     <files>
616                                         <file>${basedir}/src/main/resources/swagger.properties</file>
617                                     </files>
618                                 </configuration>
619                             </execution>
620                         </executions>
621                     </plugin>
622                     <plugin>
623                         <groupId>com.github.kongchen</groupId>
624                         <artifactId>swagger-maven-plugin</artifactId>
625                         <version>3.1.4</version>
626                         <configuration>
627                             <apiSources>
628                                 <apiSource>
629                                     <locations>${api-rest-package}</locations>
630                                     <schemes>http,https</schemes>
631                                     <host>${api-host-ip}:${api-host-port}</host>
632                                     <basePath>${api-base-path}</basePath>
633                                     <info>
634                                         <title>${api-title}</title>
635                                         <version>${api-version}</version>
636                                         <description>${api-description}</description>
637                                         <license>
638                                             <name>${api-license}</name>
639                                         </license>
640                                     </info>
641                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
642                                 </apiSource>
643                             </apiSources>
644                         </configuration>
645                         <executions>
646                             <execution>
647                                 <phase>compile</phase>
648                                 <goals>
649                                     <goal>generate</goal>
650                                 </goals>
651                             </execution>
652                         </executions>
653                     </plugin>
654                     <plugin>
655                         <groupId>org.apache.maven.plugins</groupId>
656                         <artifactId>maven-install-plugin</artifactId>
657                         <version>2.3.1</version>
658                         <executions>
659                             <execution>
660                                 <id>install-file-id</id>
661                                 <phase>install</phase>
662                                 <goals>
663                                     <goal>install-file</goal>
664                                 </goals>
665                                 <configuration>
666                                     <file>${basedir}/src/main/resources/swagger.json</file>
667                                     <groupId>${project.groupId}</groupId>
668                                     <artifactId>${project.artifactId}-swagger-schema</artifactId>
669                                     <version>${project.version}</version>
670                                     <packaging>json</packaging>
671                                 </configuration>
672                             </execution>
673                         </executions>
674                     </plugin>
675                 </plugins>
676             </build>
677         </profile>
678         <profile>
679             <id>generate-sdk</id>
680             <activation>
681                 <file>
682                     <exists>${swagger-json}</exists>
683                 </file>
684                 <property>
685                     <name>swagger-sdk.generate-java-sdk</name>
686                 </property>
687             </activation>
688             <build>
689                 <plugins>
690                     <plugin>
691                         <groupId>org.apache.maven.plugins</groupId>
692                         <artifactId>maven-antrun-plugin</artifactId>
693                         <version>1.8</version>
694                         <executions>
695                             <execution>
696                                 <phase>initialize</phase>
697                                 <id>ant-create-script</id>
698                                 <configuration>
699                                     <exportAntProperties>true</exportAntProperties>
700                                     <tasks>
701
702                                         <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
703                                         <condition property="is_windows" value="true">
704                                             <os family="windows"/>
705                                         </condition>
706                                         <condition property="isLinux" value="true">
707                                             <os family="unix"/>
708                                         </condition>
709                                         <if>
710                                             <equals arg1="${is_windows}" arg2="true"/>
711                                             <then>
712                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
713                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
714                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
715                                             </then>
716                                             <else>
717                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
718                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
719                                                 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
720                                                 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
721                                             </else>
722                                         </if>
723                                     </tasks>
724                                 </configuration>
725                                 <goals>
726                                     <goal>run</goal>
727                                 </goals>
728                             </execution>
729                         </executions>
730                         <dependencies>
731                             <dependency>
732                                 <groupId>ant-contrib</groupId>
733                                 <artifactId>ant-contrib</artifactId>
734                                 <version>1.0b3</version>
735                                 <exclusions>
736                                     <exclusion>
737                                         <groupId>ant</groupId>
738                                         <artifactId>ant</artifactId>
739                                     </exclusion>
740                                 </exclusions>
741                             </dependency>
742                         </dependencies>
743                     </plugin>
744                     <plugin>
745                         <groupId>io.swagger</groupId>
746                         <artifactId>swagger-codegen-maven-plugin</artifactId>
747                         <version>2.2.1</version>
748                         <executions>
749                             <execution>
750                                 <goals>
751                                     <goal>generate</goal>
752                                 </goals>
753                                 <configuration>
754                                     <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
755                                     <output>${project.build.directory}/generated-sources</output>
756                                     <language>java</language>
757                                     <configOptions>
758                                         <dateLibrary>joda</dateLibrary>
759                                     </configOptions>
760                                     <library>jersey2</library>
761                                     <groupId>${project.groupId}</groupId>
762                                     <artifactId>${project.artifactId}-java-sdk</artifactId>
763                                     <artifactVersion>${project.version}</artifactVersion>
764                                     <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
765                                     <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
766                                     <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
767                                 </configuration>
768                             </execution>
769                         </executions>
770                     </plugin>
771                     <plugin>
772                         <groupId>org.codehaus.mojo</groupId>
773                         <artifactId>exec-maven-plugin</artifactId>
774                         <version>1.5.0</version>
775                         <executions>
776                             <execution>
777                                 <id>swagger-generate-sources</id>
778                                 <phase>generate-sources</phase>
779                                 <goals>
780                                     <goal>exec</goal>
781                                 </goals>
782                                 <configuration>
783                                     <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
784                                 </configuration>
785                             </execution>
786                         </executions>
787                     </plugin>
788                     <plugin>
789                         <groupId>org.apache.maven.plugins</groupId>
790                         <artifactId>maven-clean-plugin</artifactId>
791                         <version>3.0.0</version>
792                         <executions>
793                             <execution>
794                                 <id>clean-generated-files</id>
795                                 <phase>generate-sources</phase>
796                                 <goals>
797                                     <goal>clean</goal>
798                                 </goals>
799                                 <configuration>
800                                     <filesets>
801                                         <fileset>
802                                             <directory>${project.build.directory}/generated-sources</directory>
803                                         </fileset>
804                                     </filesets>
805                                 </configuration>
806                             </execution>
807                         </executions>
808                     </plugin>
809                 </plugins>
810             </build>
811             <dependencies>
812                 <dependency>
813                     <groupId>org.onap.msb.swagger-sdk</groupId>
814                     <artifactId>swagger-sdk</artifactId>
815                     <version>1.0.0</version>
816                 </dependency>
817             </dependencies>
818         </profile>
819         <profile>
820             <id>sonar-jacoco-aggregate</id>
821             <activation>
822                 <property>
823                     <name>onap.jacoco.aggregateFile</name>
824                 </property>
825             </activation>
826             <build>
827                 <plugins>
828                     <plugin>
829                         <groupId>org.jacoco</groupId>
830                         <artifactId>jacoco-maven-plugin</artifactId>
831                         <executions>
832                             <execution>
833                                 <id>merge</id>
834                                 <goals>
835                                     <goal>merge</goal>
836                                 </goals>
837                                 <phase>generate-resources</phase>
838                                 <configuration>
839                                     <destFile>${onap.jacoco.aggregateFile}</destFile>
840                                     <fileSets>
841                                         <fileSet>
842                                             <directory>${project.basedir}</directory>
843                                             <includes>
844                                                 <include>**/target/code-coverage/*.exec</include>
845                                             </includes>
846                                         </fileSet>
847                                     </fileSets>
848                                 </configuration>
849                             </execution>
850                         </executions>
851                     </plugin>
852                 </plugins>
853             </build>
854         </profile>
855         <!-- End of profiles from ONAP oparent -->
856     </profiles>
857 </project>