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