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 <ccsdk.sli.adaptors.version>0.3.1-SNAPSHOT</ccsdk.sli.adaptors.version>
22 <docker.registry>TBD:5100</docker.registry>
23 <serviceArtifactName>vlantagapi</serviceArtifactName>
26 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
27 <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
28 <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
29 <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
30 <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
31 <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
32 <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
33 <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
34 <sonar.language>java</sonar.language>
35 <ilib.version>2.0.7</ilib.version>
36 <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
37 <docker.push.phase>deploy</docker.push.phase>
38 <docker.verbose>true</docker.verbose>
39 <ccsdk.project.version>${project.version}</ccsdk.project.version>
43 <groupId>org.onap.ccsdk.parent</groupId>
44 <artifactId>spring-boot-starter-parent</artifactId>
45 <version>1.2.0-SNAPSHOT</version>
52 <groupId>org.springframework.boot</groupId>
53 <artifactId>spring-boot-starter-jersey</artifactId>
56 <groupId>org.springframework.boot</groupId>
57 <artifactId>spring-boot-starter-web</artifactId>
60 <groupId>org.springframework.boot</groupId>
61 <artifactId>spring-boot-starter-test</artifactId>
66 <groupId>org.springframework.boot</groupId>
67 <artifactId>spring-boot-starter-actuator</artifactId>
71 <groupId>org.springframework.boot</groupId>
72 <artifactId>spring-boot-starter-security</artifactId>
73 <version>2.0.1.RELEASE</version>
77 <groupId>org.onap.ccsdk.sli.adaptors</groupId>
78 <artifactId>resource-assignment-provider</artifactId>
79 <version>${ccsdk.sli.adaptors.version}</version>
82 <groupId>org.slf4j</groupId>
83 <artifactId>slf4j-simple</artifactId>
89 <groupId>org.mariadb.jdbc</groupId>
90 <artifactId>mariadb-java-client</artifactId>
91 <version>${mariadb.connector.version}</version>
95 <groupId>io.swagger</groupId>
96 <artifactId>swagger-annotations</artifactId>
97 <version>1.5.8</version>
106 <groupId>org.codehaus.groovy.maven</groupId>
107 <artifactId>gmaven-plugin</artifactId>
108 <version>1.0</version>
111 <phase>validate</phase>
117 println project.properties['ccsdk.project.version'];
119 if (project.properties['ccsdk.project.version'] != null ) {
120 versionArray = project.properties['ccsdk.project.version'].split('\\.');
123 if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
125 project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
127 project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
130 println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
137 <groupId>org.apache.maven.plugins</groupId>
138 <artifactId>maven-surefire-plugin</artifactId>
140 <argLine>${surefireArgLine}</argLine>
141 <skipTests>${skip.unit.tests}</skipTests>
143 <exclude>**/IT*.java</exclude>
148 <groupId>org.jacoco</groupId>
149 <artifactId>jacoco-maven-plugin</artifactId>
150 <version>0.7.5.201505241946</version>
152 <!-- Prepares the property pointing to the JaCoCo runtime agent which
153 is passed as VM argument when Maven the Surefire plugin is executed. -->
155 <id>pre-unit-test</id>
157 <goal>prepare-agent</goal>
160 <!-- Sets the path to the file which contains the execution data. -->
161 <destFile>${sonar.jacoco.reportPath}</destFile>
162 <propertyName>surefireArgLine</propertyName>
165 <!-- Ensures that the code coverage report for unit tests is created
166 after unit tests have been run. -->
168 <id>post-unit-test</id>
174 <!-- Sets the path to the file which contains the execution data. -->
175 <dataFile>${sonar.jacoco.reportPath}</dataFile>
176 <!-- Sets the output directory for the code coverage report. -->
177 <outputDirectory>${jacoco.path}</outputDirectory>
183 <groupId>com.github.kongchen</groupId>
184 <artifactId>swagger-maven-plugin</artifactId>
185 <version>3.1.7</version>
190 <scheme>http</scheme>
191 <scheme>https</scheme>
193 <host>localhost:9091</host>
195 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
196 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
198 <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
199 <basePath>/vlantagapi</basePath>
201 <title>${project.artifactId} Service</title>
202 <version>${project.version}</version>
204 <securityDefinitions>
206 <name>basicAuth</name>
208 </securityDefinition>
209 </securityDefinitions>
210 <swaggerDirectory>${swagger.directory}</swaggerDirectory>
216 <!-- <phase>compile</phase> -->
217 <phase>package</phase>
219 <goal>generate</goal>
225 <groupId>com.spotify</groupId>
226 <artifactId>docker-maven-plugin</artifactId>
227 <version>0.4.11</version>
229 <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
230 <dockerDirectory>src/main/docker</dockerDirectory>
231 <serverId>docker-hub</serverId>
232 <registryUrl>https://${docker.registry}</registryUrl>
234 <imageTag>${project.version}</imageTag>
235 <imageTag>latest</imageTag>
237 <forceTags>true</forceTags>
240 <targetPath>/</targetPath>
241 <directory>${project.build.directory}</directory>
242 <include>${project.build.finalName}.jar</include>
248 <groupId>org.springframework.boot</groupId>
249 <artifactId>spring-boot-maven-plugin</artifactId>
250 <version>${springboot.version}</version>
254 <goal>repackage</goal>
268 <groupId>com.spotify</groupId>
269 <artifactId>docker-maven-plugin</artifactId>
270 <version>0.4.11</version>
272 <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
273 <dockerDirectory>src/main/docker</dockerDirectory>
274 <serverId>docker-hub</serverId>
275 <registryUrl>https://${docker.registry}</registryUrl>
277 <imageTag>${project.version}</imageTag>
278 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
279 <imageTag>${project.docker.latesttag.version}</imageTag>
281 <forceTags>true</forceTags>
284 <targetPath>/</targetPath>
285 <directory>${project.build.directory}</directory>
286 <include>${project.build.finalName}.jar</include>