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