83414f0dd5d137d01f65c1b7cb34ae978f749ecb
[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>1.3.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>11</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         <ilib.version>2.0.7</ilib.version>
23         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
24         <docker.push.phase>deploy</docker.push.phase>
25         <docker.verbose>true</docker.verbose>
26         <ccsdk.project.version>${project.version}</ccsdk.project.version>
27         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
28
29         <base.image.name>onap/ccsdk-alpine-j11-image</base.image.name>
30         <base.image.version>1.1.1</base.image.version>
31     </properties>
32
33     <parent>
34         <groupId>org.onap.ccsdk.parent</groupId>
35         <artifactId>spring-boot-25-starter-parent</artifactId>
36         <version>2.2.1</version>
37         <relativePath/>
38     </parent>
39
40
41     <dependencies>
42         <dependency>
43             <groupId>org.springframework.boot</groupId>
44             <artifactId>spring-boot-starter-jersey</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>org.springframework.boot</groupId>
48             <artifactId>spring-boot-starter-web</artifactId>
49         </dependency>
50         <dependency>
51             <groupId>org.springframework.boot</groupId>
52             <artifactId>spring-boot-starter-test</artifactId>
53             <scope>test</scope>
54         </dependency>
55
56         <dependency>
57             <groupId>org.springframework.boot</groupId>
58             <artifactId>spring-boot-starter-actuator</artifactId>
59         </dependency>
60
61         <dependency>
62             <groupId>org.springframework.boot</groupId>
63             <artifactId>spring-boot-starter-security</artifactId>
64         </dependency>
65
66         <dependency>
67             <groupId>org.onap.ccsdk.sli.core</groupId>
68             <artifactId>sli-common</artifactId>
69             <version>${ccsdk.sli.core.version}</version>
70             <scope>provided</scope>
71         </dependency>
72         <dependency>
73             <groupId>org.onap.ccsdk.sli.adaptors</groupId>
74             <artifactId>resource-assignment-provider</artifactId>
75             <version>${ccsdk.sli.adaptors.version}</version>
76             <exclusions>
77                 <exclusion>
78                     <groupId>org.slf4j</groupId>
79                     <artifactId>slf4j-simple</artifactId>
80                 </exclusion>
81             </exclusions>
82         </dependency>
83
84         <dependency>
85             <groupId>org.mariadb.jdbc</groupId>
86             <artifactId>mariadb-java-client</artifactId>
87         </dependency>
88
89         <dependency>
90             <groupId>io.swagger</groupId>
91             <artifactId>swagger-annotations</artifactId>
92         </dependency>
93
94         <dependency>
95             <groupId>junit</groupId>
96             <artifactId>junit</artifactId>
97             <scope>test</scope>
98         </dependency>
99     </dependencies>
100
101
102
103     <build>
104         <plugins>
105             <plugin>
106                 <groupId>org.codehaus.groovy.maven</groupId>
107                 <artifactId>gmaven-plugin</artifactId>
108                 <version>1.0</version>
109                 <executions>
110                     <execution>
111                         <phase>validate</phase>
112                         <goals>
113                             <goal>execute</goal>
114                         </goals>
115                         <configuration>
116                             <source>${basedir}/../../TagVersion.groovy</source>
117                         </configuration>
118                     </execution>
119                 </executions>
120             </plugin>
121             <plugin>
122                 <groupId>org.apache.maven.plugins</groupId>
123                 <artifactId>maven-surefire-plugin</artifactId>
124                 <configuration>
125                     <argLine>${surefireArgLine}</argLine>
126                     <skipTests>${skip.unit.tests}</skipTests>
127                     <excludes>
128                         <exclude>**/IT*.java</exclude>
129                     </excludes>
130                 </configuration>
131             </plugin>
132             <plugin>
133                 <groupId>com.github.kongchen</groupId>
134                 <artifactId>swagger-maven-plugin</artifactId>
135                 <version>3.1.7</version>
136                 <configuration>
137                     <apiSources>
138                         <apiSource>
139                             <schemes>
140                                 <scheme>http</scheme>
141                                 <scheme>https</scheme>
142                             </schemes>
143                             <host>localhost:9091</host>
144                             <locations>
145                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
146                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
147                             </locations>
148                             <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
149                             <basePath>/vlantagapi</basePath>
150                             <info>
151                                 <title>${project.artifactId} Service</title>
152                                 <version>${project.version}</version>
153                             </info>
154                             <securityDefinitions>
155                                 <securityDefinition>
156                                     <name>basicAuth</name>
157                                     <type>basic</type>
158                                 </securityDefinition>
159                             </securityDefinitions>
160                             <swaggerDirectory>${swagger.directory}</swaggerDirectory>
161                         </apiSource>
162                     </apiSources>
163                 </configuration>
164                 <executions>
165                     <execution>
166                         <!-- <phase>compile</phase> -->
167                         <phase>package</phase>
168                         <goals>
169                             <goal>generate</goal>
170                         </goals>
171                     </execution>
172                 </executions>
173             </plugin>
174             <plugin>
175                 <groupId>com.spotify</groupId>
176                 <artifactId>docker-maven-plugin</artifactId>
177                 <version>0.4.11</version>
178                 <configuration>
179                     <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
180                     <dockerDirectory>src/main/docker</dockerDirectory>
181                     <serverId>docker-hub</serverId>
182                     <registryUrl>https://${docker.registry}</registryUrl>
183                     <imageTags>
184                         <imageTag>${project.docker.latestminortag.version}</imageTag>
185                         <imageTag>${project.docker.latestfulltag.version}</imageTag>
186                         <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
187                     </imageTags>
188                     <forceTags>true</forceTags>
189                     <resources>
190                         <resource>
191                             <targetPath>/</targetPath>
192                             <directory>${project.build.directory}</directory>
193                             <include>${project.build.finalName}.jar</include>
194                         </resource>
195                     </resources>
196                 </configuration>
197             </plugin>
198             <plugin>
199                 <groupId>org.springframework.boot</groupId>
200                 <artifactId>spring-boot-maven-plugin</artifactId>
201                 <version>${springboot.version}</version>
202                 <executions>
203                     <execution>
204                         <goals>
205                             <goal>repackage</goal>
206                         </goals>
207                     </execution>
208                 </executions>
209             </plugin>
210         </plugins>
211     </build>
212
213     <profiles>
214         <profile>
215             <id>docker</id>
216             <build>
217                 <plugins>
218                     <plugin>
219                         <groupId>com.spotify</groupId>
220                         <artifactId>docker-maven-plugin</artifactId>
221                         <version>0.4.11</version>
222                         <configuration>
223                             <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
224                             <dockerDirectory>src/main/docker</dockerDirectory>
225                             <serverId>docker-hub</serverId>
226                             <registryUrl>https://${docker.registry}</registryUrl>
227                             <imageTags>
228                                 <imageTag>${project.version}</imageTag>
229                                 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
230                                 <imageTag>${project.docker.latesttag.version}</imageTag>
231                             </imageTags>
232                             <forceTags>true</forceTags>
233                             <resources>
234                                 <resource>
235                                     <targetPath>/</targetPath>
236                                     <directory>${project.build.directory}</directory>
237                                     <include>${project.build.finalName}.jar</include>
238                                 </resource>
239                             </resources>
240                         </configuration>
241                     </plugin>
242                 </plugins>
243             </build>
244         </profile>
245     </profiles>
246
247
248 </project>