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