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