Merge "fixed major sonar issue in WebConfig.java"
[ccsdk/apps.git] / ms / neng / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- 
3  * ============LICENSE_START=======================================================
4  * ONAP : CCSDK.apps
5  * ================================================================================
6  * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  * 
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  * 
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20   -->
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24
25     <groupId>org.onap.ccsdk.apps</groupId>
26     <artifactId>ccsdk-apps-ms-neng</artifactId>
27     <version>0.3.0-SNAPSHOT</version>
28
29     <properties>
30         <swagger.directory>${basedir}/target/classes/META-INF/resources/swagger</swagger.directory>
31         <icd.file>service.json</icd.file>
32         <icd.package>org.onap.ccsdk.apps.ms.neng.service.rs</icd.package>
33         <java.version>1.8</java.version>
34         <spring.version>4.3.8.RELEASE</spring.version>
35         <springboot.version>1.5.6.RELEASE</springboot.version>
36         <docker.registry>nexus3.onap.org:10003</docker.registry>
37         <build.number>local</build.number>
38         <kube.namespace>TBD</kube.namespace>
39         <service.account>TBD</service.account>
40         <namespace>org.onap.ccsdk.apps.ms.neng</namespace>
41         <maven.compiler.source>1.8</maven.compiler.source>
42         <maven.compiler.target>1.8</maven.compiler.target>
43         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44         <sdk.java.rest>6.2.0.11</sdk.java.rest>
45         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
46         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
47         <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
48         <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
49         <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
50         <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
51         <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
52         <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
53         <sonar.language>java</sonar.language>
54         <serviceArtifactName>ms-networkelementnamegen</serviceArtifactName>
55         <project.version>0.3.0</project.version>
56         <ccsdk.distribution.version>0.2.4</ccsdk.distribution.version>
57         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
58                 <docker.push.phase>deploy</docker.push.phase>
59                 <docker.verbose>true</docker.verbose>
60                 <ccsdk.project.version>${project.version}</ccsdk.project.version>
61     </properties>
62
63     <profiles>
64         <profile>
65             <id>all-tests</id>
66             <properties>
67                 <build.profile.id>all-tests</build.profile.id>
68                 <skip.integration.tests>false</skip.integration.tests>
69                 <skip.unit.tests>false</skip.unit.tests>
70             </properties>
71         </profile>
72         <profile>
73             <id>dev</id>
74         </profile>
75         <profile>
76             <id>integration-test</id>
77             <properties>
78                 <build.profile.id>integration-test</build.profile.id>
79                 <skip.integration.tests>false</skip.integration.tests>
80                 <skip.unit.tests>true</skip.unit.tests>
81             </properties>
82         </profile>
83
84         <profile>
85             <id>blackduck</id>
86             <activation>
87                 <property>
88                     <name>blackduck-scan</name>
89                 </property>
90             </activation>
91             <build>
92                 <plugins>
93                     <plugin>
94                         <groupId>com.blackducksoftware.integration</groupId>
95                         <artifactId>hub-maven-plugin</artifactId>
96                         <version>1.4.0</version>
97                         <inherited>false</inherited>
98                         <configuration>
99                             <hubProjectName>${project.name}</hubProjectName>
100                             <outputDirectory>${project.basedir}</outputDirectory>
101                         </configuration>
102                         <executions>
103                             <execution>
104                                 <id>create-bdio-file</id>
105                                 <phase>package</phase>
106                                 <goals>
107                                     <goal>createHubOutput</goal>
108                                 </goals>
109                             </execution>
110                         </executions>
111                     </plugin>
112                 </plugins>
113             </build>
114         </profile>
115
116         <profile>
117                 <id>docker</id>
118                 <build>
119                         <plugins>
120                                 <plugin>
121                                         <groupId>com.spotify</groupId>
122                                         <artifactId>docker-maven-plugin</artifactId>
123                                         <version>0.4.11</version>
124                                         <configuration>
125                                                 <imageName>onap/ccsdk-apps-ms-neng:${project.version}</imageName>
126                                                 <dockerDirectory>src/main/docker</dockerDirectory>
127                                                 <serverId>docker-hub</serverId>
128                                                 <registryUrl>https://${docker.registry}</registryUrl>
129                                                 <imageTags>
130                                                         <imageTag>${project.version}</imageTag>
131                                                         <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
132                                                         <imageTag>${project.docker.latesttag.version}</imageTag>
133                                                 </imageTags>
134                                                 <forceTags>true</forceTags>
135                                                 <resources>
136                                                         <resource>
137                                                                 <targetPath>/</targetPath>
138                                                                 <directory>${project.build.directory}</directory>
139                                                                 <include>${project.build.finalName}.jar</include>
140                                                         </resource>
141                                                         <resource>
142                                                                 <targetPath>/</targetPath>
143                                                                 <directory>${project.build.directory}</directory>
144                                                                 <include>opt/etc/config/*</include>
145                                                         </resource>
146                                                         <resource>
147                                                                 <targetPath>/</targetPath>
148                                                                 <directory>${project.build.directory}</directory>
149                                                                 <include>opt/etc/keystore/*</include>
150                                                         </resource>
151                                                         <resource>
152                                                                 <targetPath>/</targetPath>
153                                                                 <directory>${project.build.directory}</directory>
154                                                                 <include>opt/etc/truststore/*</include>
155                                                         </resource>
156                                                         <resource>
157                                                                 <targetPath>/</targetPath>
158                                                                 <directory>${project.build.directory}</directory>
159                                                                 <include>opt/aai/keystore/*</include>
160                                                         </resource>
161                                                         <resource>
162                                                                 <targetPath>/</targetPath>
163                                                                 <directory>${project.build.directory}</directory>
164                                                                 <include>etc/*</include>
165                                                         </resource>
166                                                 </resources>
167                                         </configuration>
168                                 </plugin>
169                         </plugins>
170                 </build>
171         </profile>
172
173     </profiles>
174
175     <developers>
176         <developer>
177             <id>${userId}</id>
178         </developer>
179     </developers>
180    
181  
182     <parent>
183         <groupId>org.onap.ccsdk.parent</groupId>
184         <artifactId>odlparent-lite</artifactId>
185         <version>1.1.0-SNAPSHOT</version>
186         <relativePath />
187     </parent>
188
189     <dependencyManagement>
190         <dependencies>
191             <dependency>
192                 <groupId>org.springframework.boot</groupId>
193                 <artifactId>spring-boot-starter-parent</artifactId>
194                 <version>${springboot.version}</version>
195                 <type>pom</type>
196                 <scope>import</scope>
197             </dependency>
198         </dependencies>
199     </dependencyManagement>
200
201     <dependencies>
202         <dependency>
203             <groupId>io.swagger</groupId>
204             <artifactId>swagger-core</artifactId>
205             <version>1.5.20</version>
206         </dependency>
207         <dependency>
208             <groupId>org.springframework.boot</groupId>
209             <artifactId>spring-boot-starter-web</artifactId>
210             <version>${springboot.version}</version>
211         </dependency>
212         <dependency>
213             <groupId>org.springframework.boot</groupId>
214             <artifactId>spring-boot-starter-jersey</artifactId>
215             <version>${springboot.version}</version>
216         </dependency>
217         <dependency>
218             <groupId>org.springframework.boot</groupId>
219             <artifactId>spring-boot-starter-actuator</artifactId>
220             <version>${springboot.version}</version>
221         </dependency>
222         <dependency>
223             <groupId>org.springframework.boot</groupId>
224             <artifactId>spring-boot-loader-tools</artifactId>
225             <version>${springboot.version}</version>
226         </dependency>
227         <dependency>
228             <groupId>org.springframework.boot</groupId>
229             <artifactId>spring-boot-starter-test</artifactId>
230             <version>${springboot.version}</version>
231             <scope>test</scope>
232         </dependency>
233         <dependency>
234             <groupId>org.springframework.boot</groupId>
235             <artifactId>spring-boot-starter-tomcat</artifactId>
236             <version>${springboot.version}</version>
237             <scope>compile</scope>
238         </dependency>
239         <dependency>
240             <groupId>org.springframework.boot</groupId>
241             <artifactId>spring-boot-starter-data-jpa</artifactId>
242             <version>${springboot.version}</version>
243             <scope>compile</scope>
244         </dependency>
245         <dependency>
246             <groupId>org.apache.httpcomponents</groupId>
247             <artifactId>httpclient</artifactId>
248         </dependency>
249         <dependency>
250             <groupId>javax.ws.rs</groupId>
251             <artifactId>javax.ws.rs-api</artifactId>
252             <version>2.1</version>
253         </dependency>
254         <dependency>
255             <groupId>commons-lang</groupId>
256             <artifactId>commons-lang</artifactId>
257             <version>2.6</version>
258         </dependency>
259         <dependency>
260             <groupId>org.liquibase</groupId>
261             <artifactId>liquibase-core</artifactId>
262         </dependency>
263                 <dependency>
264                         <groupId>org.mariadb.jdbc</groupId>
265                         <artifactId>mariadb-java-client</artifactId>
266                         <version>${mariadb.connector.version}</version>
267                 </dependency>
268         <dependency>
269             <groupId>com.h2database</groupId>
270             <artifactId>h2</artifactId>
271         </dependency>
272         <dependency>
273             <groupId>org.springframework.boot</groupId>
274             <artifactId>spring-boot-configuration-processor</artifactId>
275             <version>${springboot.version}</version>
276             <optional>true</optional>
277         </dependency>
278         <dependency>
279             <groupId>org.springframework</groupId>
280             <artifactId>spring-test</artifactId>
281             <version>${spring.version}</version>
282             <scope>test</scope>
283         </dependency>
284         <dependency>
285             <groupId>org.springframework</groupId>
286             <artifactId>spring-aop</artifactId>
287             <version>${spring.version}</version>
288         </dependency>
289         <dependency>
290             <groupId>org.springframework</groupId>
291             <artifactId>spring-beans</artifactId>
292         </dependency>
293         <dependency>
294             <groupId>org.springframework</groupId>
295             <artifactId>spring-beans</artifactId>
296             <version>${spring.version}</version>
297         </dependency>
298         <dependency>
299             <groupId>org.springframework</groupId>
300             <artifactId>spring-context</artifactId>
301             <version>${spring.version}</version>
302         </dependency>
303         <dependency>
304             <groupId>org.springframework</groupId>
305             <artifactId>spring-core</artifactId>
306             <version>${spring.version}</version>
307         </dependency>
308         <dependency>
309             <groupId>org.springframework</groupId>
310             <artifactId>spring-expression</artifactId>
311             <version>${spring.version}</version>
312         </dependency>
313         <dependency>
314             <groupId>org.springframework</groupId>
315             <artifactId>spring-web</artifactId>
316             <version>${spring.version}</version>
317         </dependency>
318     </dependencies>
319
320     <build>
321         <finalName>NetworkElementNameGen</finalName>
322         <plugins>
323             <plugin>
324                 <groupId>org.codehaus.groovy.maven</groupId>
325                 <artifactId>gmaven-plugin</artifactId>
326                 <version>1.0</version>
327                 <executions>
328                     <execution>
329                         <phase>validate</phase>
330                         <goals>
331                             <goal>execute</goal>
332                         </goals>
333                         <configuration>
334                             <source>
335                                 println project.properties['ccsdk.project.version'];
336                                 def versionArray;
337                                 if (project.properties['ccsdk.project.version'] != null ) {
338                                     versionArray = project.properties['ccsdk.project.version'].split('\\.');
339                                 }
340
341                                 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
342                                 {
343                                     project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
344                                 } else {
345                                     project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
346                                 }
347
348                                 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
349                             </source>
350                         </configuration>
351                     </execution>
352                 </executions>
353             </plugin>
354             <plugin>
355                 <groupId>org.jacoco</groupId>
356                 <artifactId>jacoco-maven-plugin</artifactId>
357                 <version>0.7.5.201505241946</version>
358                 <executions>
359                     <execution>
360                         <id>pre-unit-test</id>
361                         <goals>
362                             <goal>prepare-agent</goal>
363                         </goals>
364                         <configuration>
365                             <destFile>${sonar.jacoco.reportPath}</destFile>
366                             <propertyName>surefireArgLine</propertyName>
367                         </configuration>
368                     </execution>
369                     <execution>
370                         <id>post-unit-test</id>
371                         <phase>test</phase>
372                         <goals>
373                             <goal>report</goal>
374                         </goals>
375                         <configuration>
376                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
377                             <outputDirectory>${jacoco.path}</outputDirectory>
378                         </configuration>
379                     </execution>
380                     <execution>
381                         <id>pre-integration-test</id>
382                         <phase>pre-integration-test</phase>
383                         <goals>
384                             <goal>prepare-agent</goal>
385                         </goals>
386                         <configuration>
387                             <destFile>${sonar.jacoco.itReportPath}</destFile>
388                             <propertyName>failsafeArgLine</propertyName>
389                         </configuration>
390                     </execution>
391                     <execution>
392                         <id>post-integration-test</id>
393                         <phase>post-integration-test</phase>
394                         <goals>
395                             <goal>report</goal>
396                         </goals>
397                         <configuration>
398                             <dataFile>${sonar.jacoco.itReportPath}/</dataFile>
399                             <outputDirectory>${jacoco.itPath}</outputDirectory>
400                         </configuration>
401                     </execution>
402                 </executions>
403             </plugin>
404             <plugin>
405                 <groupId>org.apache.maven.plugins</groupId>
406                 <artifactId>maven-surefire-plugin</artifactId>
407                 <configuration>
408                     <argLine>${surefireArgLine}</argLine>
409                     <skipTests>${skip.unit.tests}</skipTests>
410                     <excludes>
411                         <exclude>**/IT*.java</exclude>
412                     </excludes>
413                 </configuration>
414             </plugin>
415             <plugin>
416                 <groupId>org.apache.maven.plugins</groupId>
417                 <artifactId>maven-failsafe-plugin</artifactId>
418                 <executions>
419                     <execution>
420                         <id>integration-tests</id>
421                         <goals>
422                             <goal>integration-test</goal>
423                             <goal>verify</goal>
424                         </goals>
425                         <configuration>
426                             <argLine>${failsafeArgLine}</argLine>
427                             <skipTests>${skip.integration.tests}</skipTests>
428                         </configuration>
429                     </execution>
430                 </executions>
431             </plugin>
432             <plugin>
433                 <artifactId>maven-dependency-plugin</artifactId>
434             </plugin>
435             <plugin>
436                 <groupId>com.github.kongchen</groupId>
437                 <artifactId>swagger-maven-plugin</artifactId>
438                 <version>3.1.3</version>
439                 <configuration>
440                     <apiSources>
441                         <apiSource>
442                             <locations>org.onap.ccsdk.apps.ms.neng.service.rs</locations>
443                             <basePath>/web</basePath>
444                             <info>
445                                 <title>${project.artifactId} Service</title>
446                                 <version>${project.version}</version>
447                             </info>
448                             <swaggerDirectory>${swagger.directory}</swaggerDirectory>
449                         </apiSource>
450                     </apiSources>
451                 </configuration>
452                 <executions>
453                     <execution>
454                         <phase>package</phase>
455                         <goals>
456                             <goal>generate</goal>
457                         </goals>
458                     </execution>
459                 </executions>
460             </plugin>
461
462             <plugin>
463                 <artifactId>exec-maven-plugin</artifactId>
464                 <groupId>org.codehaus.mojo</groupId>
465             </plugin>
466             <!--
467             <plugin>
468                 <groupId>io.fabric8</groupId>
469                 <artifactId>docker-maven-plugin</artifactId>
470                 <inherited>false</inherited>
471                 <configuration>
472                     <verbose>false</verbose>
473                     <images>
474                         <image>
475                             <name>onap/ccsdk-apps-ms-neng</name>
476                             <build>
477                                 <cleanup>try</cleanup>
478                                 <dockerFileDir>${basedir}/src/main/docker</dockerFileDir>
479                                 <dockerFile>Dockerfile</dockerFile>
480                                 <tags>
481                                     <tag>${project.version}</tag>
482                                 </tags>
483
484                                <assembly>
485                                     <targetDir>/</targetDir>
486                                     <inline>
487                                         <files>
488                                             <file>
489                                                 <source>${project.build.directory}/${build.finalName}.${project.packaging}</source>
490                                             </file>
491                                         </files>
492                                         <fileSet>
493                                             <directory>${basedir}/opt/etc</directory>
494                                             <outputDirectory>opt/etc</outputDirectory>
495                                             <includes>
496                                                 <include>**</include>
497                                             </includes>
498                                         </fileSet>
499                                     </inline>
500                                 </assembly>
501
502
503                             </build>
504                         </image>
505                     </images>
506                 </configuration>
507                 <executions>
508                     <execution>
509                         <id>generate-images</id>
510                         <phase>package</phase>
511                         <goals>
512                             <goal>build</goal>
513                         </goals>
514                     </execution>
515
516                     <execution>
517                         <id>push-images</id>
518                         <phase>deploy</phase>
519                         <goals>
520                             <goal>build</goal>
521                             <goal>push</goal>
522                         </goals>
523                     </execution>
524                 </executions>
525             </plugin>
526             -->
527
528  
529             <plugin>
530                 <groupId>org.springframework.boot</groupId>
531                 <artifactId>spring-boot-maven-plugin</artifactId>
532                 <version>${springboot.version}</version>
533                 <executions>
534                     <execution>
535                         <goals>
536                             <goal>repackage</goal>
537                         </goals>
538                     </execution>
539                 </executions>
540             </plugin>
541         </plugins>
542         <resources>
543             <resource>
544                 <directory>src/main/resources</directory>
545                 <filtering>true</filtering>
546                 <includes>
547                     <include>**/*</include>
548                 </includes>
549             </resource>
550             <resource>
551                 <directory>opt/aai/keystore</directory>
552                 <targetPath>../opt/aai/keystore</targetPath>
553                 <filtering>false</filtering>
554                 <includes>
555                     <include>**/*</include>
556                 </includes>
557             </resource>
558
559             <resource>
560                 <directory>opt/etc/config</directory>
561                 <targetPath>../opt/etc/config</targetPath>
562                 <filtering>true</filtering>
563                 <includes>
564                     <include>**/*</include>
565                 </includes>
566             </resource>
567             <resource>
568                 <directory>opt/etc/keystore</directory>
569                 <targetPath>../opt/etc/keystore</targetPath>
570                 <filtering>false</filtering>
571                 <includes>
572                     <include>**/*</include>
573                 </includes>
574             </resource>
575             <resource>
576                 <directory>opt/etc/truststore</directory>
577                 <targetPath>../opt/etc/truststore</targetPath>
578                 <filtering>false</filtering>
579                 <includes>
580                     <include>**/*</include>
581                 </includes>
582             </resource>
583         </resources>
584         <pluginManagement>
585             <plugins>
586                 <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
587                 <plugin>
588                     <groupId>org.eclipse.m2e</groupId>
589                     <artifactId>lifecycle-mapping</artifactId>
590                     <version>1.0.0</version>
591                     <configuration>
592                         <lifecycleMappingMetadata>
593                             <pluginExecutions>
594                                 <pluginExecution>
595                                     <pluginExecutionFilter>
596                                         <groupId>
597                                             org.apache.maven.plugins
598                                         </groupId>
599                                         <artifactId>
600                                             maven-checkstyle-plugin
601                                         </artifactId>
602                                         <versionRange>
603                                             [2.17,)
604                                         </versionRange>
605                                         <goals>
606                                             <goal>check</goal>
607                                         </goals>
608                                     </pluginExecutionFilter>
609                                     <action>
610                                         <ignore></ignore>
611                                     </action>
612                                 </pluginExecution>
613                                 <pluginExecution>
614                                     <pluginExecutionFilter>
615                                         <groupId>
616                                             org.codehaus.mojo
617                                         </groupId>
618                                         <artifactId>
619                                             properties-maven-plugin
620                                         </artifactId>
621                                         <versionRange>
622                                             [1.0.0,)
623                                         </versionRange>
624                                         <goals>
625                                             <goal>
626                                                 set-system-properties
627                                             </goal>
628                                         </goals>
629                                     </pluginExecutionFilter>
630                                     <action>
631                                         <ignore></ignore>
632                                     </action>
633                                 </pluginExecution>
634                             </pluginExecutions>
635                         </lifecycleMappingMetadata>
636                     </configuration>
637                 </plugin>
638             </plugins>
639         </pluginManagement>
640     </build>
641     
642 </project>
643