Merge "Modify the path of the swagger"
[holmes/rule-management.git] / rulemgt / pom.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3   ~ Copyright 2017 ZTE Corporation.
4   ~
5   ~ Licensed under the Apache License, Version 2.0 (the "License");
6   ~ you may not use this file except in compliance with the License.
7   ~ You may obtain a copy of the License at
8   ~
9   ~     http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~ Unless required by applicable law or agreed to in writing, software
12   ~ distributed under the License is distributed on an "AS IS" BASIS,
13   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~ See the License for the specific language governing permissions and
15   ~ limitations under the License.
16   -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19
20     <modelVersion>4.0.0</modelVersion>
21     <parent>
22         <groupId>org.onap.holmes.rule-management</groupId>
23         <artifactId>holmes-rulemgt-parent</artifactId>
24         <version>1.0.0-SNAPSHOT</version>
25     </parent>
26
27     <artifactId>holmes-rulemgt</artifactId>
28     <name>holmes-rulemgt-service</name>
29     <packaging>jar</packaging>
30
31     <dependencies>
32         <dependency>
33             <groupId>org.onap.msb.java-sdk</groupId>
34             <artifactId>msb-java-sdk</artifactId>
35         </dependency>
36         <dependency>
37             <groupId>org.reflections</groupId>
38             <artifactId>reflections</artifactId>
39         </dependency>
40         <dependency>
41             <groupId>org.onap.holmes.common</groupId>
42             <artifactId>holmes-actions</artifactId>
43             <version>1.0.0-SNAPSHOT</version>
44             <exclusions>
45                 <exclusion>
46                     <groupId>org.glassfish.jersey.containers</groupId>
47                     <artifactId>jersey-container-servlet-core</artifactId>
48                 </exclusion>
49                 <exclusion>
50                     <groupId>org.apache.activemq</groupId>
51                     <artifactId>activemq-core</artifactId>
52                 </exclusion>
53             </exclusions>
54         </dependency>
55         <dependency>
56             <groupId>org.easymock</groupId>
57             <artifactId>easymock</artifactId>
58         </dependency>
59         <dependency>
60             <groupId>io.dropwizard</groupId>
61             <artifactId>dropwizard-db</artifactId>
62         </dependency>
63         <dependency>
64             <groupId>org.antlr</groupId>
65             <artifactId>stringtemplate</artifactId>
66         </dependency>
67         <dependency>
68             <groupId>io.dropwizard</groupId>
69             <artifactId>dropwizard-core</artifactId>
70             <exclusions>
71                 <exclusion>
72                     <groupId>ch.qos.logback</groupId>
73                     <artifactId>logback</artifactId>
74                 </exclusion>
75                 <exclusion>
76                     <artifactId>log4j-over-slf4j</artifactId>
77                     <groupId>org.slf4j</groupId>
78                 </exclusion>
79             </exclusions>
80         </dependency>
81         <dependency>
82             <groupId>org.projectlombok</groupId>
83             <artifactId>lombok</artifactId>
84         </dependency>
85         <dependency>
86             <groupId>org.postgresql</groupId>
87             <artifactId>postgresql</artifactId>
88         </dependency>
89         <dependency>
90             <groupId>org.quartz-scheduler</groupId>
91             <artifactId>quartz</artifactId>
92         </dependency>
93         <dependency>
94             <groupId>junit</groupId>
95             <artifactId>junit</artifactId>
96         </dependency>
97         <dependency>
98             <groupId>org.hamcrest</groupId>
99             <artifactId>hamcrest-core</artifactId>
100         </dependency>
101         <dependency>
102             <groupId>org.powermock</groupId>
103             <artifactId>powermock-module-junit4</artifactId>
104         </dependency>
105         <dependency>
106             <groupId>org.slf4j</groupId>
107             <artifactId>slf4j-api</artifactId>
108         </dependency>
109         <dependency>
110             <groupId>io.swagger</groupId>
111             <artifactId>swagger-jersey2-jaxrs</artifactId>
112             <scope>provided</scope>
113         </dependency>
114
115         <dependency>
116             <groupId>org.powermock</groupId>
117             <artifactId>powermock-api-easymock</artifactId>
118             <version>1.6.5</version>
119             <scope>test</scope>
120         </dependency>
121         <dependency>
122             <groupId>org.powermock</groupId>
123             <artifactId>powermock-api-mockito</artifactId>
124             <version>1.7.1</version>
125             <scope>test</scope>
126         </dependency>
127         <dependency>
128             <groupId>org.powermock</groupId>
129             <artifactId>powermock-module-junit4-rule</artifactId>
130             <version>1.6.5</version>
131             <scope>test</scope>
132         </dependency>
133         <dependency>
134             <groupId>org.powermock</groupId>
135             <artifactId>powermock-classloading-xstream</artifactId>
136             <version>1.6.5</version>
137             <scope>test</scope>
138         </dependency>
139         <dependency>
140             <groupId>org.hamcrest</groupId>
141             <artifactId>hamcrest-library</artifactId>
142             <version>1.3</version>
143             <scope>test</scope>
144         </dependency>
145         <dependency>
146             <groupId>org.easymock</groupId>
147             <artifactId>easymock</artifactId>
148             <version>3.0</version>
149             <scope>test</scope>
150         </dependency>
151         <dependency>
152             <groupId>org.javassist</groupId>
153             <artifactId>javassist</artifactId>
154             <version>3.15.0-GA</version>
155         </dependency>
156         <dependency>
157             <groupId>org.apache.httpcomponents</groupId>
158             <artifactId>httpclient</artifactId>
159             <version>4.3.6</version>
160         </dependency>
161         <dependency>
162             <groupId>com.googlecode.json-simple</groupId>
163             <artifactId>json-simple</artifactId>
164             <version>1.1.1</version>
165         </dependency>
166         <dependency>
167             <groupId>net.sf.json-lib</groupId>
168             <artifactId>json-lib</artifactId>
169             <version>2.4</version>
170             <classifier>jdk15</classifier>
171         </dependency>
172         <dependency>
173             <groupId>org.glassfish.jersey.core</groupId>
174             <artifactId>jersey-server</artifactId>
175             <version>${jersey.version}</version>
176         </dependency>
177         <dependency>
178             <groupId>org.glassfish.jersey.core</groupId>
179             <artifactId>jersey-client</artifactId>
180             <version>${jersey.version}</version>
181         </dependency>
182         <dependency>
183             <groupId>org.glassfish.jersey.core</groupId>
184             <artifactId>jersey-common</artifactId>
185             <version>${jersey.version}</version>
186         </dependency>
187         <dependency>
188             <groupId>org.glassfish.jersey.containers</groupId>
189             <artifactId>jersey-container-servlet-core</artifactId>
190             <version>${jersey.version}</version>
191         </dependency>
192         <dependency>
193             <groupId>com.google.guava</groupId>
194             <artifactId>guava</artifactId>
195             <version>19.0</version>
196         </dependency>
197     </dependencies>
198     <build>
199         <plugins>
200             <plugin>
201                 <groupId>org.apache.maven.plugins</groupId>
202                 <artifactId>maven-jar-plugin</artifactId>
203                 <configuration>
204                     <archive>
205                         <manifest>
206                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
207                         </manifest>
208                     </archive>
209                 </configuration>
210             </plugin>
211             <plugin>
212                 <groupId>org.apache.maven.plugins</groupId>
213                 <artifactId>maven-compiler-plugin</artifactId>
214                 <version>3.3</version>
215                 <configuration>
216                     <source>1.8</source>
217                     <target>1.8</target>
218                 </configuration>
219             </plugin>
220             <plugin>
221                 <groupId>org.apache.maven.plugins</groupId>
222                 <artifactId>maven-shade-plugin</artifactId>
223                 <configuration>
224                     <createDependencyReducedPom>true</createDependencyReducedPom>
225                     <filters>
226                         <filter>
227                             <artifact>*:*</artifact>
228                             <excludes>
229                                 <exclude>META-INF/*.SF</exclude>
230                                 <exclude>META-INF/*.DSA</exclude>
231                                 <exclude>META-INF/*.RSA</exclude>
232                             </excludes>
233                         </filter>
234                     </filters>
235                 </configuration>
236                 <executions>
237                     <execution>
238                         <phase>package</phase>
239                         <goals>
240                             <goal>shade</goal>
241                         </goals>
242                         <configuration>
243                             <transformers>
244                                 <transformer
245                                     implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
246                                 <transformer
247                                     implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
248                                     <mainClass>org.onap.holmes.rulemgt.RuleActiveApp</mainClass>
249                                 </transformer>
250                             </transformers>
251                         </configuration>
252                     </execution>
253                 </executions>
254             </plugin>
255         </plugins>
256         <resources>
257             <resource>
258                 <directory>src/main/java</directory>
259                 <includes>
260                     <include>**/*.properties</include>
261                 </includes>
262             </resource>
263             <resource>
264                 <directory>src/main/resources</directory>
265             </resource>
266         </resources>
267     </build>
268
269     <profiles>
270         <profile>
271             <id>swagger</id>
272             <dependencies>
273                 <dependency>
274                     <groupId>io.swagger</groupId>
275                     <artifactId>swagger-jersey2-jaxrs</artifactId>
276                     <version>1.5.0</version>
277                 </dependency>
278             </dependencies>
279             <build>
280                 <plugins>
281                     <plugin>
282                         <groupId>com.github.kongchen</groupId>
283                         <artifactId>swagger-maven-plugin</artifactId>
284                         <version>3.1.1</version>
285                         <configuration>
286                             <apiSources>
287                                 <apiSource>
288                                     <springmvc>false</springmvc>
289                                     <locations>org.onap.holmes.rulemgt.resources</locations>
290                                     <basePath>/api/holmes-rule-mgmt/v1/</basePath>
291                                     <info>
292                                         <title>API Descriptions for Holmes Rule Management</title>
293                                         <version>v1</version>
294                                         <description>
295                                             This page shows all the APIs available in the Holmes rule management module.
296                                         </description>
297                                         <termsOfService>
298                                             http://www.github.com/kongchen/swagger-maven-plugin
299                                         </termsOfService>
300                                         <contact>
301                                             <email>fu.guangrong@zte.com.cn</email>
302                                             <name>Guangrong Fu</name>
303                                         </contact>
304                                         <license>
305                                             <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
306                                             <name>Apache 2.0</name>
307                                         </license>
308                                     </info>
309                                     <securityDefinitions>
310                                     </securityDefinitions>
311                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
312                                 </apiSource>
313                             </apiSources>
314                         </configuration>
315                         <executions>
316                             <execution>
317                                 <phase>compile</phase>
318                                 <goals>
319                                     <goal>generate</goal>
320                                 </goals>
321                             </execution>
322                         </executions>
323                         <dependencies>
324                             <dependency>
325                                 <groupId>io.swagger</groupId>
326                                 <artifactId>swagger-hibernate-validations</artifactId>
327                                 <version>1.5.6</version>
328                             </dependency>
329                         </dependencies>
330                     </plugin>
331                 </plugins>
332             </build>
333         </profile>
334     </profiles>
335 </project>