0a113666649060acc0eb18bf6cf557956c5f6182
[ccsdk/apps.git] / ms / vlantag-api / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <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">
3     <modelVersion>4.0.0</modelVersion>
4
5     <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
6     <artifactId>vlantag-api</artifactId>
7     <version>0.7.0-SNAPSHOT</version>
8     <packaging>jar</packaging>
9
10     <name>Vlantag API</name>
11     <description>Vlantag Api Service for Vlantag management of VNFs</description>
12
13     <properties>
14         <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
15         <swagger.annotations.version>1.5.8</swagger.annotations.version>
16         <java.version>1.8</java.version>
17         <springboot.version>2.0.4.RELEASE</springboot.version>
18         <mariadb.connector.version>2.1.1</mariadb.connector.version>
19         <docker.registry>TBD:5100</docker.registry>
20         <serviceArtifactName>vlantagapi</serviceArtifactName>
21
22         <!-- Sonar -->
23         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
24         <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
25         <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
26         <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
27         <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
28         <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
29         <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
30         <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
31         <sonar.language>java</sonar.language>
32         <ilib.version>2.0.7</ilib.version>
33         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
34         <docker.push.phase>deploy</docker.push.phase>
35         <docker.verbose>true</docker.verbose>
36         <ccsdk.project.version>${project.version}</ccsdk.project.version>
37         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
38     </properties>
39
40     <parent>
41         <groupId>org.onap.ccsdk.parent</groupId>
42         <artifactId>spring-boot-starter-parent</artifactId>
43         <version>1.5.1-SNAPSHOT</version>
44         <relativePath/>
45     </parent>
46
47
48     <dependencies>
49         <dependency>
50             <groupId>org.springframework.boot</groupId>
51             <artifactId>spring-boot-starter-jersey</artifactId>
52         </dependency>
53         <dependency>
54             <groupId>org.springframework.boot</groupId>
55             <artifactId>spring-boot-starter-web</artifactId>
56         </dependency>
57         <dependency>
58             <groupId>org.springframework.boot</groupId>
59             <artifactId>spring-boot-starter-test</artifactId>
60             <scope>test</scope>
61         </dependency>
62
63         <dependency>
64             <groupId>org.springframework.boot</groupId>
65             <artifactId>spring-boot-starter-actuator</artifactId>
66         </dependency>
67
68         <dependency>
69             <groupId>org.springframework.boot</groupId>
70             <artifactId>spring-boot-starter-security</artifactId>
71         </dependency>
72
73         <dependency>
74             <groupId>org.onap.ccsdk.sli.core</groupId>
75             <artifactId>sli-common</artifactId>
76             <version>${ccsdk.sli.core.version}</version>
77             <scope>provided</scope>
78         </dependency>
79         <dependency>
80             <groupId>org.onap.ccsdk.sli.adaptors</groupId>
81             <artifactId>resource-assignment-provider</artifactId>
82             <version>${ccsdk.sli.adaptors.version}</version>
83             <exclusions>
84                 <exclusion>
85                     <groupId>org.slf4j</groupId>
86                     <artifactId>slf4j-simple</artifactId>
87                 </exclusion>
88             </exclusions>
89         </dependency>
90
91         <dependency>
92             <groupId>org.mariadb.jdbc</groupId>
93             <artifactId>mariadb-java-client</artifactId>
94         </dependency>
95
96         <dependency>
97             <groupId>io.swagger</groupId>
98             <artifactId>swagger-annotations</artifactId>
99         </dependency>
100     </dependencies>
101
102
103
104     <build>
105         <plugins>
106             <plugin>
107                 <groupId>org.codehaus.groovy.maven</groupId>
108                 <artifactId>gmaven-plugin</artifactId>
109                 <version>1.0</version>
110                 <executions>
111                     <execution>
112                         <phase>validate</phase>
113                         <goals>
114                             <goal>execute</goal>
115                         </goals>
116                         <configuration>
117                             <source>${basedir}/../../TagVersion.groovy</source>
118                         </configuration>
119                     </execution>
120                 </executions>
121             </plugin>
122             <plugin>
123                 <groupId>org.apache.maven.plugins</groupId>
124                 <artifactId>maven-surefire-plugin</artifactId>
125                 <configuration>
126                     <argLine>${surefireArgLine}</argLine>
127                     <skipTests>${skip.unit.tests}</skipTests>
128                     <excludes>
129                         <exclude>**/IT*.java</exclude>
130                     </excludes>
131                 </configuration>
132             </plugin>
133             <plugin>
134                 <groupId>org.jacoco</groupId>
135                 <artifactId>jacoco-maven-plugin</artifactId>
136                 <version>0.7.5.201505241946</version>
137                 <executions>
138                     <!-- Prepares the property pointing to the JaCoCo runtime agent which 
139                         is passed as VM argument when Maven the Surefire plugin is executed. -->
140                     <execution>
141                         <id>pre-unit-test</id>
142                         <goals>
143                             <goal>prepare-agent</goal>
144                         </goals>
145                         <configuration>
146                             <!-- Sets the path to the file which contains the execution data. -->
147                             <destFile>${sonar.jacoco.reportPath}</destFile>
148                             <propertyName>surefireArgLine</propertyName>
149                         </configuration>
150                     </execution>
151                     <!-- Ensures that the code coverage report for unit tests is created 
152                         after unit tests have been run. -->
153                     <execution>
154                         <id>post-unit-test</id>
155                         <phase>test</phase>
156                         <goals>
157                             <goal>report</goal>
158                         </goals>
159                         <configuration>
160                             <!-- Sets the path to the file which contains the execution data. -->
161                             <dataFile>${sonar.jacoco.reportPath}</dataFile>
162                             <!-- Sets the output directory for the code coverage report. -->
163                             <outputDirectory>${jacoco.path}</outputDirectory>
164                         </configuration>
165                     </execution>
166                 </executions>
167             </plugin>
168             <plugin>
169                 <groupId>com.github.kongchen</groupId>
170                 <artifactId>swagger-maven-plugin</artifactId>
171                 <version>3.1.7</version>
172                 <configuration>
173                     <apiSources>
174                         <apiSource>
175                             <schemes>
176                                 <scheme>http</scheme>
177                                 <scheme>https</scheme>
178                             </schemes>
179                             <host>localhost:9091</host>
180                             <locations>
181                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
182                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
183                             </locations>
184                             <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
185                             <basePath>/vlantagapi</basePath>
186                             <info>
187                                 <title>${project.artifactId} Service</title>
188                                 <version>${project.version}</version>
189                             </info>
190                             <securityDefinitions>
191                                 <securityDefinition>
192                                     <name>basicAuth</name>
193                                     <type>basic</type>
194                                 </securityDefinition>
195                             </securityDefinitions>
196                             <swaggerDirectory>${swagger.directory}</swaggerDirectory>
197                         </apiSource>
198                     </apiSources>
199                 </configuration>
200                 <executions>
201                     <execution>
202                         <!-- <phase>compile</phase> -->
203                         <phase>package</phase>
204                         <goals>
205                             <goal>generate</goal>
206                         </goals>
207                     </execution>
208                 </executions>
209             </plugin>
210             <plugin>
211                 <groupId>com.spotify</groupId>
212                 <artifactId>docker-maven-plugin</artifactId>
213                 <version>0.4.11</version>
214                 <configuration>
215                     <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
216                     <dockerDirectory>src/main/docker</dockerDirectory>
217                     <serverId>docker-hub</serverId>
218                     <registryUrl>https://${docker.registry}</registryUrl>
219                     <imageTags>
220                         <imageTag>${project.docker.latestminortag.version}</imageTag>
221                         <imageTag>${project.docker.latestfulltag.version}</imageTag>
222                         <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
223                     </imageTags>
224                     <forceTags>true</forceTags>
225                     <resources>
226                         <resource>
227                             <targetPath>/</targetPath>
228                             <directory>${project.build.directory}</directory>
229                             <include>${project.build.finalName}.jar</include>
230                         </resource>
231                     </resources>
232                 </configuration>
233             </plugin>
234             <plugin>
235                 <groupId>org.springframework.boot</groupId>
236                 <artifactId>spring-boot-maven-plugin</artifactId>
237                 <version>${springboot.version}</version>
238                 <executions>
239                     <execution>
240                         <goals>
241                             <goal>repackage</goal>
242                         </goals>
243                     </execution>
244                 </executions>
245             </plugin>
246         </plugins>
247     </build>
248
249     <profiles>
250         <profile>
251             <id>docker</id>
252             <build>
253                 <plugins>
254                     <plugin>
255                         <groupId>com.spotify</groupId>
256                         <artifactId>docker-maven-plugin</artifactId>
257                         <version>0.4.11</version>
258                         <configuration>
259                             <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
260                             <dockerDirectory>src/main/docker</dockerDirectory>
261                             <serverId>docker-hub</serverId>
262                             <registryUrl>https://${docker.registry}</registryUrl>
263                             <imageTags>
264                                 <imageTag>${project.version}</imageTag>
265                                 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
266                                 <imageTag>${project.docker.latesttag.version}</imageTag>
267                             </imageTags>
268                             <forceTags>true</forceTags>
269                             <resources>
270                                 <resource>
271                                     <targetPath>/</targetPath>
272                                     <directory>${project.build.directory}</directory>
273                                     <include>${project.build.finalName}.jar</include>
274                                 </resource>
275                             </resources>
276                         </configuration>
277                     </plugin>
278                 </plugins>
279             </build>
280         </profile>
281     </profiles>
282
283
284 </project>