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