Release 1.1.0 dockers and roll version
[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.1.1-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         <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-starter-parent</artifactId>
36         <version>2.1.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     </dependencies>
94
95
96
97     <build>
98         <plugins>
99             <plugin>
100                 <groupId>org.codehaus.groovy.maven</groupId>
101                 <artifactId>gmaven-plugin</artifactId>
102                 <version>1.0</version>
103                 <executions>
104                     <execution>
105                         <phase>validate</phase>
106                         <goals>
107                             <goal>execute</goal>
108                         </goals>
109                         <configuration>
110                             <source>${basedir}/../../TagVersion.groovy</source>
111                         </configuration>
112                     </execution>
113                 </executions>
114             </plugin>
115             <plugin>
116                 <groupId>org.apache.maven.plugins</groupId>
117                 <artifactId>maven-surefire-plugin</artifactId>
118                 <configuration>
119                     <argLine>${surefireArgLine}</argLine>
120                     <skipTests>${skip.unit.tests}</skipTests>
121                     <excludes>
122                         <exclude>**/IT*.java</exclude>
123                     </excludes>
124                 </configuration>
125             </plugin>
126             <plugin>
127                 <groupId>com.github.kongchen</groupId>
128                 <artifactId>swagger-maven-plugin</artifactId>
129                 <version>3.1.7</version>
130                 <configuration>
131                     <apiSources>
132                         <apiSource>
133                             <schemes>
134                                 <scheme>http</scheme>
135                                 <scheme>https</scheme>
136                             </schemes>
137                             <host>localhost:9091</host>
138                             <locations>
139                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
140                                 <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
141                             </locations>
142                             <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
143                             <basePath>/vlantagapi</basePath>
144                             <info>
145                                 <title>${project.artifactId} Service</title>
146                                 <version>${project.version}</version>
147                             </info>
148                             <securityDefinitions>
149                                 <securityDefinition>
150                                     <name>basicAuth</name>
151                                     <type>basic</type>
152                                 </securityDefinition>
153                             </securityDefinitions>
154                             <swaggerDirectory>${swagger.directory}</swaggerDirectory>
155                         </apiSource>
156                     </apiSources>
157                 </configuration>
158                 <executions>
159                     <execution>
160                         <!-- <phase>compile</phase> -->
161                         <phase>package</phase>
162                         <goals>
163                             <goal>generate</goal>
164                         </goals>
165                     </execution>
166                 </executions>
167             </plugin>
168             <plugin>
169                 <groupId>com.spotify</groupId>
170                 <artifactId>docker-maven-plugin</artifactId>
171                 <version>0.4.11</version>
172                 <configuration>
173                     <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
174                     <dockerDirectory>src/main/docker</dockerDirectory>
175                     <serverId>docker-hub</serverId>
176                     <registryUrl>https://${docker.registry}</registryUrl>
177                     <imageTags>
178                         <imageTag>${project.docker.latestminortag.version}</imageTag>
179                         <imageTag>${project.docker.latestfulltag.version}</imageTag>
180                         <imageTag>${project.docker.latesttagtimestamp.version}</imageTag>
181                     </imageTags>
182                     <forceTags>true</forceTags>
183                     <resources>
184                         <resource>
185                             <targetPath>/</targetPath>
186                             <directory>${project.build.directory}</directory>
187                             <include>${project.build.finalName}.jar</include>
188                         </resource>
189                     </resources>
190                 </configuration>
191             </plugin>
192             <plugin>
193                 <groupId>org.springframework.boot</groupId>
194                 <artifactId>spring-boot-maven-plugin</artifactId>
195                 <version>${springboot.version}</version>
196                 <executions>
197                     <execution>
198                         <goals>
199                             <goal>repackage</goal>
200                         </goals>
201                     </execution>
202                 </executions>
203             </plugin>
204         </plugins>
205     </build>
206
207     <profiles>
208         <profile>
209             <id>docker</id>
210             <build>
211                 <plugins>
212                     <plugin>
213                         <groupId>com.spotify</groupId>
214                         <artifactId>docker-maven-plugin</artifactId>
215                         <version>0.4.11</version>
216                         <configuration>
217                             <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
218                             <dockerDirectory>src/main/docker</dockerDirectory>
219                             <serverId>docker-hub</serverId>
220                             <registryUrl>https://${docker.registry}</registryUrl>
221                             <imageTags>
222                                 <imageTag>${project.version}</imageTag>
223                                 <imageTag>${project.version}-STAGING-${maven.build.timestamp}</imageTag>
224                                 <imageTag>${project.docker.latesttag.version}</imageTag>
225                             </imageTags>
226                             <forceTags>true</forceTags>
227                             <resources>
228                                 <resource>
229                                     <targetPath>/</targetPath>
230                                     <directory>${project.build.directory}</directory>
231                                     <include>${project.build.finalName}.jar</include>
232                                 </resource>
233                             </resources>
234                         </configuration>
235                     </plugin>
236                 </plugins>
237             </build>
238         </profile>
239     </profiles>
240
241
242 </project>