Add swagger-sdk support for MSB service
[msb/apigateway.git] / apiroute / apiroute-service / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
3         Licensed under the Apache License, Version 2.0 (the "License"); you may not
4         use this file except in compliance with the License. You may obtain a copy
5         of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
6         by applicable law or agreed to in writing, software distributed under the
7         License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
8         OF ANY KIND, either express or implied. See the License for the specific
9         language governing permissions and limitations under the License. -->
10 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
11         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
12         <parent>
13                 <groupId>org.onap.msb.apigateway.apiroute</groupId>
14                 <artifactId>apiroute-parent</artifactId>
15                 <version>1.0.0-SNAPSHOT</version>
16         </parent>
17         <modelVersion>4.0.0</modelVersion>
18         <groupId>org.onap.msb.apigateway.apiroute</groupId>
19         <artifactId>apiroute-service</artifactId>
20         <name>onap/msb/apigateway/apiroute/apiroute-service</name>
21         <packaging>jar</packaging>
22         <version>1.0.0-SNAPSHOT</version>
23
24
25         <dependencies>
26                 <dependency>
27                         <groupId>io.dropwizard</groupId>
28                         <artifactId>dropwizard-core</artifactId>
29                 </dependency>
30                 <dependency>
31                         <groupId>io.dropwizard</groupId>
32                         <artifactId>dropwizard-assets</artifactId>
33                 </dependency>
34                 <dependency>
35                         <groupId>io.dropwizard</groupId>
36                         <artifactId>dropwizard-client</artifactId>
37                 </dependency>
38                 <dependency>
39                         <groupId>io.swagger</groupId>
40                         <artifactId>swagger-jersey2-jaxrs</artifactId>
41                         <scope>compile</scope>
42                 </dependency>
43                 <!-- add by wangyg:增加redis的java客户端jedis依赖 -->
44                 <dependency>
45                         <groupId>redis.clients</groupId>
46                         <artifactId>jedis</artifactId>
47                 </dependency>
48                 <dependency>
49                         <groupId>org.projectlombok</groupId>
50                         <artifactId>lombok</artifactId>
51                 </dependency>
52
53                 <dependency>
54                         <groupId>junit</groupId>
55                         <artifactId>junit</artifactId>
56                         <scope>test</scope>
57                 </dependency>
58                 <dependency>
59                         <groupId>org.powermock</groupId>
60                         <artifactId>powermock-module-junit4</artifactId>
61                         <scope>test</scope>
62                 </dependency>
63
64                 <dependency>
65                         <groupId>org.powermock</groupId>
66                         <artifactId>powermock-api-mockito</artifactId>
67                         <scope>test</scope>
68                 </dependency>
69                 <dependency>
70                         <groupId>com.orbitz.consul</groupId>
71                         <artifactId>consul-client</artifactId>
72                 </dependency>
73
74                 <dependency>
75                         <groupId>com.fasterxml.jackson.core</groupId>
76                         <artifactId>jackson-databind</artifactId>
77                 </dependency>
78
79                 <dependency>
80                         <groupId>com.fasterxml.jackson.core</groupId>
81                         <artifactId>jackson-core</artifactId>
82                 </dependency>
83
84                 <dependency>
85                         <groupId>com.fasterxml.jackson.core</groupId>
86                         <artifactId>jackson-annotations</artifactId>
87                 </dependency>
88
89                 <dependency>
90                         <groupId>org.apache.httpcomponents</groupId>
91                         <artifactId>httpasyncclient</artifactId>
92                 </dependency>
93
94                 <dependency>
95                         <groupId>org.immutables</groupId>
96                         <artifactId>value</artifactId>
97                         <scope>compile</scope>
98                 </dependency>
99
100                 <dependency>
101                         <groupId>com.fiftyonred</groupId>
102                         <artifactId>mock-jedis</artifactId>
103                 </dependency>
104
105                 <dependency>
106         <groupId>commons-io</groupId>
107         <artifactId>commons-io</artifactId>
108       </dependency>
109
110           <dependency>
111           <groupId>org.onap.msb.swagger-sdk</groupId>
112           <artifactId>swagger-sdk</artifactId>
113           <version>1.0.0-SNAPSHOT</version>
114         </dependency>
115
116         </dependencies>
117         <build>
118                 <plugins>
119                         <plugin>
120                                 <groupId>org.apache.maven.plugins</groupId>
121                                 <artifactId>maven-jar-plugin</artifactId>
122                                 <version>2.4</version>
123                                 <configuration>
124                                         <archive>
125                                                 <manifest>
126                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
127                                                 </manifest>
128                                         </archive>
129                                 </configuration>
130                         </plugin>
131                         <plugin>
132                                 <groupId>org.apache.maven.plugins</groupId>
133                                 <artifactId>maven-shade-plugin</artifactId>
134                                 <version>2.3</version>
135                                 <configuration>
136                                         <createDependencyReducedPom>true</createDependencyReducedPom>
137                                         <filters>
138                                                 <filter>
139                                                         <artifact>*:*</artifact>
140                                                         <excludes>
141                                                                 <exclude>META-INF/*.SF</exclude>
142                                                                 <exclude>META-INF/*.DSA</exclude>
143                                                                 <exclude>META-INF/*.RSA</exclude>
144                                                         </excludes>
145                                                 </filter>
146                                         </filters>
147                                 </configuration>
148                                 <executions>
149                                         <execution>
150                                                 <phase>package</phase>
151                                                 <goals>
152                                                         <goal>shade</goal>
153                                                 </goals>
154                                                 <configuration>
155                                                         <transformers>
156                                                                 <transformer
157                                                                         implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
158                                                                 <transformer
159                                                                         implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
160                                                                         <mainClass>org.onap.msb.apiroute.ApiRouteApp</mainClass>
161                                                                 </transformer>
162                                                         </transformers>
163                                                 </configuration>
164                                         </execution>
165                                 </executions>
166                         </plugin>
167
168                         <!-- JSON -->
169                          <plugin>
170                                         <groupId>org.codehaus.mojo</groupId>
171                                         <artifactId>properties-maven-plugin</artifactId>
172                                         <version>1.0.0</version>
173                                           <executions>
174                                                   <execution>
175                                                         <phase>initialize</phase>
176                                                         <goals>
177                                                           <goal>read-project-properties</goal>
178                                                         </goals>
179                                                         <configuration>
180                                                           <files>
181                                                                 <file>${basedir}/src/main/resources/swagger.properties</file>
182                                                           </files>
183                                                         </configuration>
184                                                   </execution>
185                                         </executions>
186                                 </plugin>
187                                 <plugin>
188                                         <groupId>com.github.kongchen</groupId>
189                                         <artifactId>swagger-maven-plugin</artifactId>
190                                         <version>3.1.4</version>
191                                         <configuration>
192                                                 <apiSources>
193                                                   <apiSource>
194                                                                 <locations>${api-rest-package}</locations>
195                                                                 <schemes>http,https</schemes>
196                                                                 <host>${api-host-ip}:${api-host-port}</host>
197                                                                 <basePath>${api-base-path}</basePath>
198                                                                 <info>
199                                                                         <title>${api-title}</title>
200                                                                         <version>${api-version}</version>
201                                                                         <description>${api-description}</description>
202                                                                         <license>
203                                                                                 <name>${api-license}</name>
204                                                                         </license>
205                                                                 </info>
206                                                                 <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
207                                                         </apiSource>
208                                                 </apiSources>
209                                         </configuration>
210                                         <executions>
211                                                 <execution>
212                                                         <phase>compile</phase>
213                                                         <goals>
214                                                                 <goal>generate</goal>
215                                                         </goals>
216                                                 </execution>
217                                         </executions>
218                                 </plugin>
219                                 <plugin>
220                                         <groupId>org.apache.maven.plugins</groupId>
221                                         <artifactId>maven-install-plugin</artifactId>
222                                         <version>2.3.1</version>
223                                         <executions>
224                                                 <execution>
225                                                         <id>install-file-id</id>
226                                                         <phase>install</phase>
227                                                         <goals>
228                                                                 <goal>install-file</goal>
229                                                         </goals>
230                                                         <configuration>
231                                                                 <file>${basedir}/src/main/resources/swagger.json</file>
232                                                                 <groupId>${project.groupId}</groupId>
233                                                                 <artifactId>${project.artifactId}-swagger-schema</artifactId>
234                                                                 <version>${project.version}</version>
235                                                                 <packaging>json</packaging>
236                                                         </configuration>
237                                                 </execution>
238                                         </executions>
239                                 </plugin>
240                 </plugins>
241                 <resources>
242                         <resource>
243                                 <directory>src/main/java</directory>
244                                 <includes>
245                                         <include>**/*.properties</include>
246                                 </includes>
247                         </resource>
248                         <resource>
249                                 <directory>src/main/resources</directory>
250                         </resource>
251                 </resources>
252         </build>
253 </project>