Solve nexus-iq security issue
[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.2.4-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.2.4-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                 <!-- add by wangyg:增加redis的java客户端jedis依赖 -->
39                 <dependency>
40                         <groupId>redis.clients</groupId>
41                         <artifactId>jedis</artifactId>
42                 </dependency>
43                 <dependency>
44                         <groupId>org.projectlombok</groupId>
45                         <artifactId>lombok</artifactId>
46                 </dependency>
47
48                 <dependency>
49                         <groupId>junit</groupId>
50                         <artifactId>junit</artifactId>
51                         <scope>test</scope>
52                 </dependency>
53                 <dependency>
54                         <groupId>org.powermock</groupId>
55                         <artifactId>powermock-module-junit4</artifactId>
56                         <scope>test</scope>
57                 </dependency>
58
59                 <dependency>
60                         <groupId>org.powermock</groupId>
61                         <artifactId>powermock-api-mockito</artifactId>
62                         <scope>test</scope>
63                 </dependency>
64                 <dependency>
65                         <groupId>com.orbitz.consul</groupId>
66                         <artifactId>consul-client</artifactId>
67                 </dependency>
68
69                 <dependency>
70                         <groupId>com.fasterxml.jackson.core</groupId>
71                         <artifactId>jackson-databind</artifactId>
72                 </dependency>
73
74                 <dependency>
75                         <groupId>com.fasterxml.jackson.core</groupId>
76                         <artifactId>jackson-core</artifactId>
77                 </dependency>
78
79                 <dependency>
80                         <groupId>com.fasterxml.jackson.core</groupId>
81                         <artifactId>jackson-annotations</artifactId>
82                 </dependency>
83
84                 <dependency>
85                         <groupId>org.apache.httpcomponents</groupId>
86                         <artifactId>httpasyncclient</artifactId>
87                 </dependency>
88
89                 <dependency>
90                         <groupId>org.immutables</groupId>
91                         <artifactId>value</artifactId>
92                         <scope>compile</scope>
93                 </dependency>
94
95                 <dependency>
96                         <groupId>com.fiftyonred</groupId>
97                         <artifactId>mock-jedis</artifactId>
98                 </dependency>
99
100                 <dependency>
101                         <groupId>commons-io</groupId>
102                         <artifactId>commons-io</artifactId>
103                 </dependency>
104
105                 <dependency>
106                         <groupId>org.onap.msb.swagger-sdk</groupId>
107                         <artifactId>swagger-sdk</artifactId>
108                         <version>1.1.0</version>
109                         <exclusions>
110                                 <exclusion>
111                                         <groupId>org.slf4j</groupId>
112                                         <artifactId>slf4j-log4j12</artifactId>
113                                 </exclusion>
114                                 <exclusion>
115                                         <groupId>commons-beanutils</groupId>
116                                         <artifactId>commons-beanutils</artifactId>
117                                 </exclusion>
118                                 <exclusion>
119                                         <groupId>commons-collections</groupId>
120                                         <artifactId>commons-collections</artifactId>
121                                 </exclusion>
122                         </exclusions>
123                 </dependency>
124
125         </dependencies>
126         <build>
127                 <plugins>
128                         <plugin>
129                                 <groupId>org.apache.maven.plugins</groupId>
130                                 <artifactId>maven-jar-plugin</artifactId>
131                                 <version>2.4</version>
132                                 <configuration>
133                                         <archive>
134                                                 <manifest>
135                                                         <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
136                                                 </manifest>
137                                         </archive>
138                                 </configuration>
139                         </plugin>
140                         <plugin>
141                                 <groupId>org.apache.maven.plugins</groupId>
142                                 <artifactId>maven-shade-plugin</artifactId>
143                                 <version>2.3</version>
144                                 <configuration>
145                                         <createDependencyReducedPom>true</createDependencyReducedPom>
146                                         <filters>
147                                                 <filter>
148                                                         <artifact>*:*</artifact>
149                                                         <excludes>
150                                                                 <exclude>META-INF/*.SF</exclude>
151                                                                 <exclude>META-INF/*.DSA</exclude>
152                                                                 <exclude>META-INF/*.RSA</exclude>
153                                                         </excludes>
154                                                 </filter>
155                                         </filters>
156                                 </configuration>
157                                 <executions>
158                                         <execution>
159                                                 <phase>package</phase>
160                                                 <goals>
161                                                         <goal>shade</goal>
162                                                 </goals>
163                                                 <configuration>
164                                                         <transformers>
165                                                                 <transformer
166                                                                         implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
167                                                                 <transformer
168                                                                         implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
169                                                                         <mainClass>org.onap.msb.apiroute.ApiRouteApp</mainClass>
170                                                                 </transformer>
171                                                         </transformers>
172                                                 </configuration>
173                                         </execution>
174                                 </executions>
175                         </plugin>
176
177                         <!-- JSON -->
178                         <plugin>
179                                 <groupId>org.codehaus.mojo</groupId>
180                                 <artifactId>properties-maven-plugin</artifactId>
181                                 <version>1.0.0</version>
182                                 <executions>
183                                         <execution>
184                                                 <phase>initialize</phase>
185                                                 <goals>
186                                                         <goal>read-project-properties</goal>
187                                                 </goals>
188                                                 <configuration>
189                                                         <files>
190                                                                 <file>${basedir}/src/main/resources/swagger.properties</file>
191                                                         </files>
192                                                 </configuration>
193                                         </execution>
194                                 </executions>
195                         </plugin>
196                         <plugin>
197                                 <groupId>com.github.kongchen</groupId>
198                                 <artifactId>swagger-maven-plugin</artifactId>
199                                 <version>3.1.4</version>
200                                 <configuration>
201                                         <apiSources>
202                                                 <apiSource>
203                                                         <locations>${api-rest-package}</locations>
204                                                         <schemes>
205                                                                 <scheme>http</scheme>
206                                                                 <scheme>https</scheme>
207                                                         </schemes>
208                                                         <host>${api-host-ip}:${api-host-port}</host>
209                                                         <basePath>${api-base-path}</basePath>
210                                                         <info>
211                                                                 <title>${api-title}</title>
212                                                                 <version>${api-version}</version>
213                                                                 <description>${api-description}</description>
214                                                                 <license>
215                                                                         <name>${api-license}</name>
216                                                                 </license>
217                                                         </info>
218                                                         <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
219                                                 </apiSource>
220                                         </apiSources>
221                                 </configuration>
222                                 <executions>
223                                         <execution>
224                                                 <phase>compile</phase>
225                                                 <goals>
226                                                         <goal>generate</goal>
227                                                 </goals>
228                                         </execution>
229                                 </executions>
230                         </plugin>
231                         <plugin>
232                                 <groupId>org.apache.maven.plugins</groupId>
233                                 <artifactId>maven-install-plugin</artifactId>
234                                 <version>2.3.1</version>
235                                 <executions>
236                                         <execution>
237                                                 <id>install-file-id</id>
238                                                 <phase>install</phase>
239                                                 <goals>
240                                                         <goal>install-file</goal>
241                                                 </goals>
242                                                 <configuration>
243                                                         <file>${basedir}/src/main/resources/swagger.json</file>
244                                                         <groupId>${project.groupId}</groupId>
245                                                         <artifactId>${project.artifactId}-swagger-schema</artifactId>
246                                                         <version>${project.version}</version>
247                                                         <packaging>json</packaging>
248                                                 </configuration>
249                                         </execution>
250                                 </executions>
251                         </plugin>
252
253                         <!-- SDK -->
254                         <plugin>
255                                 <groupId>org.apache.maven.plugins</groupId>
256                                 <artifactId>maven-antrun-plugin</artifactId>
257                                 <version>1.8</version>
258                                 <executions>
259                                         <execution>
260                                                 <phase>initialize</phase>
261                                                 <id>ant-create-script</id>
262                                                 <configuration>
263                                                         <exportAntProperties>true</exportAntProperties>
264                                                         <tasks>
265                                                                 <taskdef resource="net/sf/antcontrib/antlib.xml"
266                                                                         classpathref="maven.plugin.classpath" />
267                                                                 <condition property="is_windows" value="true">
268                                                                         <os family="windows" />
269                                                                 </condition>
270                                                                 <condition property="isLinux" value="true">
271                                                                         <os family="unix" />
272                                                                 </condition>
273                                                                 <if>
274                                                                         <equals arg1="${is_windows}" arg2="true" />
275                                                                         <then>
276                                                                                 <property name="swagger.sdk.script.file" value="generated-source-script.bat" />
277                                                                                 <echo
278                                                                                         file="${project.build.directory}${file.separator}generated-source-script.bat"
279                                                                                         append="true"
280                                                                                         message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}" />
281                                                                                 <echo
282                                                                                         file="${project.build.directory}${file.separator}generated-source-script.bat"
283                                                                                         append="true"
284                                                                                         message="mvn clean install -Dmaven.test.skip=true${line.separator}" />
285                                                                         </then>
286                                                                         <else>
287                                                                                 <property name="swagger.sdk.script.file" value="generated-source-script.sh" />
288                                                                                 <echo
289                                                                                         file="${project.build.directory}${file.separator}generated-source-script.sh"
290                                                                                         append="true"
291                                                                                         message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}" />
292                                                                                 <echo
293                                                                                         file="${project.build.directory}${file.separator}generated-source-script.sh"
294                                                                                         append="true"
295                                                                                         message="mvn clean install -Dmaven.test.skip=true${line.separator}" />
296                                                                                 <chmod
297                                                                                         file="${project.build.directory}${file.separator}generated-source-script.sh"
298                                                                                         perm="755" />
299                                                                         </else>
300                                                                 </if>
301                                                         </tasks>
302                                                 </configuration>
303                                                 <goals>
304                                                         <goal>run</goal>
305                                                 </goals>
306                                         </execution>
307                                 </executions>
308                                 <dependencies>
309                                         <dependency>
310                                                 <groupId>ant-contrib</groupId>
311                                                 <artifactId>ant-contrib</artifactId>
312                                                 <version>1.0b3</version>
313                                                 <exclusions>
314                                                         <exclusion>
315                                                                 <artifactId>ant</artifactId>
316                                                                 <groupId>ant</groupId>
317                                                         </exclusion>
318                                                 </exclusions>
319                                         </dependency>
320                                 </dependencies>
321                         </plugin>
322                         <plugin>
323                                 <groupId>io.swagger</groupId>
324                                 <artifactId>swagger-codegen-maven-plugin</artifactId>
325                                 <version>2.2.1</version>
326                                 <executions>
327                                         <execution>
328                                                 <goals>
329                                                         <goal>generate</goal>
330                                                 </goals>
331                                                 <configuration>
332                                                         <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
333                                                         <output>${project.build.directory}/generated-sources</output>
334                                                         <language>java</language>
335                                                         <configOptions>
336                                                                 <dateLibrary>joda</dateLibrary>
337                                                         </configOptions>
338                                                         <library>jersey2</library>
339                                                         <groupId>${project.groupId}</groupId>
340                                                         <artifactId>${project.artifactId}</artifactId>
341                                                         <artifactVersion>${project.version}</artifactVersion>
342                                                         <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
343                                                         <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
344                                                         <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
345                                                 </configuration>
346                                         </execution>
347                                 </executions>
348                         </plugin>
349                         <plugin>
350                                 <artifactId>exec-maven-plugin</artifactId>
351                                 <groupId>org.codehaus.mojo</groupId>
352                                 <version>1.5.0</version>
353                                 <executions>
354                                         <execution>
355                                                 <id>swagger-generate-sources</id>
356                                                 <phase>generate-sources</phase>
357                                                 <goals>
358                                                         <goal>exec</goal>
359                                                 </goals>
360                                                 <configuration>
361                                                         <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
362                                                 </configuration>
363                                         </execution>
364                                 </executions>
365                         </plugin>
366                         <plugin>
367                                 <groupId>org.apache.maven.plugins</groupId>
368                                 <artifactId>maven-clean-plugin</artifactId>
369                                 <version>3.0.0</version>
370                                 <executions>
371                                         <execution>
372                                                 <id>clean-generated-files</id>
373                                                 <phase>generate-sources</phase>
374                                                 <goals>
375                                                         <goal>clean</goal>
376                                                 </goals>
377                                                 <configuration>
378                                                         <filesets>
379                                                                 <fileset>
380                                                                         <directory>${project.build.directory}/generated-sources</directory>
381                                                                 </fileset>
382                                                         </filesets>
383                                                 </configuration>
384                                         </execution>
385                                 </executions>
386                         </plugin>
387                 </plugins>
388                 <resources>
389                         <resource>
390                                 <directory>src/main/java</directory>
391                                 <includes>
392                                         <include>**/*.properties</include>
393                                 </includes>
394                         </resource>
395                         <resource>
396                                 <directory>src/main/resources</directory>
397                         </resource>
398                 </resources>
399         </build>
400 </project>