1 <?xml version="1.0" encoding="UTF-8"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 <modelVersion>4.0.0</modelVersion>
7 <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
8 <artifactId>vlantag-api</artifactId>
9 <version>0.4.0-SNAPSHOT</version>
10 <packaging>jar</packaging>
12 <name>vlantag-api</name>
13 <description>Vlantag Api Service for Vlantag management of VNFs</description>
16 <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
17 <swagger.annotations.version>1.5.8</swagger.annotations.version>
18 <java.version>1.8</java.version>
19 <springboot.version>2.0.4.RELEASE</springboot.version>
20 <mariadb.connector.version>2.1.1</mariadb.connector.version>
21 <docker.registry>TBD:5100</docker.registry>
22 <serviceArtifactName>vlantagapi</serviceArtifactName>
25 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
26 <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
27 <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
28 <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
29 <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
30 <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
31 <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
32 <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
33 <sonar.language>java</sonar.language>
34 <ilib.version>2.0.7</ilib.version>
35 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
36 <docker.push.phase>deploy</docker.push.phase>
37 <docker.verbose>true</docker.verbose>
38 <ccsdk.project.version>${project.version}</ccsdk.project.version>
42 <groupId>org.onap.ccsdk.parent</groupId>
43 <artifactId>spring-boot-starter-parent</artifactId>
44 <version>1.2.0-SNAPSHOT</version>
51 <groupId>org.springframework.boot</groupId>
52 <artifactId>spring-boot-starter-jersey</artifactId>
55 <groupId>org.springframework.boot</groupId>
56 <artifactId>spring-boot-starter-web</artifactId>
59 <groupId>org.springframework.boot</groupId>
60 <artifactId>spring-boot-starter-test</artifactId>
65 <groupId>org.springframework.boot</groupId>
66 <artifactId>spring-boot-starter-actuator</artifactId>
70 <groupId>org.springframework.boot</groupId>
71 <artifactId>spring-boot-starter-security</artifactId>
72 <version>2.0.1.RELEASE</version>
76 <groupId>org.onap.ccsdk.sli.adaptors</groupId>
77 <artifactId>resource-assignment-provider</artifactId>
78 <version>${ccsdk.sli.adaptors.version}</version>
81 <groupId>org.slf4j</groupId>
82 <artifactId>slf4j-simple</artifactId>
88 <groupId>org.mariadb.jdbc</groupId>
89 <artifactId>mariadb-java-client</artifactId>
90 <version>${mariadb.connector.version}</version>
94 <groupId>io.swagger</groupId>
95 <artifactId>swagger-annotations</artifactId>
96 <version>1.5.8</version>
105 <groupId>org.codehaus.groovy.maven</groupId>
106 <artifactId>gmaven-plugin</artifactId>
107 <version>1.0</version>
110 <phase>validate</phase>
116 println project.properties['ccsdk.project.version'];
118 if (project.properties['ccsdk.project.version'] != null ) {
119 versionArray = project.properties['ccsdk.project.version'].split('\\.');
122 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
124 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
126 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
129 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
136 <groupId>org.apache.maven.plugins</groupId>
137 <artifactId>maven-surefire-plugin</artifactId>
139 <argLine>${surefireArgLine}</argLine>
140 <skipTests>${skip.unit.tests}</skipTests>
142 <exclude>**/IT*.java</exclude>
147 <groupId>org.jacoco</groupId>
148 <artifactId>jacoco-maven-plugin</artifactId>
149 <version>0.7.5.201505241946</version>
151 <!-- Prepares the property pointing to the JaCoCo runtime agent which
152 is passed as VM argument when Maven the Surefire plugin is executed. -->
154 <id>pre-unit-test</id>
156 <goal>prepare-agent</goal>
159 <!-- Sets the path to the file which contains the execution data. -->
160 <destFile>${sonar.jacoco.reportPath}</destFile>
161 <propertyName>surefireArgLine</propertyName>
164 <!-- Ensures that the code coverage report for unit tests is created
165 after unit tests have been run. -->
167 <id>post-unit-test</id>
173 <!-- Sets the path to the file which contains the execution data. -->
174 <dataFile>${sonar.jacoco.reportPath}</dataFile>
175 <!-- Sets the output directory for the code coverage report. -->
176 <outputDirectory>${jacoco.path}</outputDirectory>
182 <groupId>com.github.kongchen</groupId>
183 <artifactId>swagger-maven-plugin</artifactId>
184 <version>3.1.7</version>
189 <scheme>http</scheme>
190 <scheme>https</scheme>
192 <host>localhost:9091</host>
194 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
195 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
197 <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
198 <basePath>/vlantagapi</basePath>
200 <title>${project.artifactId} Service</title>
201 <version>${project.version}</version>
203 <securityDefinitions>
205 <name>basicAuth</name>
207 </securityDefinition>
208 </securityDefinitions>
209 <swaggerDirectory>${swagger.directory}</swaggerDirectory>
215 <!-- <phase>compile</phase> -->
216 <phase>package</phase>
218 <goal>generate</goal>
224 <groupId>com.spotify</groupId>
225 <artifactId>docker-maven-plugin</artifactId>
226 <version>0.4.11</version>
228 <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
229 <dockerDirectory>src/main/docker</dockerDirectory>
230 <serverId>docker-hub</serverId>
231 <registryUrl>https://${docker.registry}</registryUrl>
233 <imageTag>${project.version}</imageTag>
234 <imageTag>latest</imageTag>
236 <forceTags>true</forceTags>
239 <targetPath>/</targetPath>
240 <directory>${project.build.directory}</directory>
241 <include>${project.build.finalName}.jar</include>
247 <groupId>org.springframework.boot</groupId>
248 <artifactId>spring-boot-maven-plugin</artifactId>
249 <version>${springboot.version}</version>
253 <goal>repackage</goal>
267 <groupId>com.spotify</groupId>
268 <artifactId>docker-maven-plugin</artifactId>
269 <version>0.4.11</version>
271 <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
272 <dockerDirectory>src/main/docker</dockerDirectory>
273 <serverId>docker-hub</serverId>
274 <registryUrl>https://${docker.registry}</registryUrl>
276 <imageTag>${project.version}</imageTag>
277 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
278 <imageTag>${project.docker.latesttag.version}</imageTag>
280 <forceTags>true</forceTags>
283 <targetPath>/</targetPath>
284 <directory>${project.build.directory}</directory>
285 <include>${project.build.finalName}.jar</include>