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