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