Add Swagger Related Configurations
[holmes/engine-management.git] / engine-d / 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"
18     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20
21     <modelVersion>4.0.0</modelVersion>
22     <parent>
23         <groupId>org.onap.holmes.engine-management</groupId>
24         <artifactId>holmes-engine-parent</artifactId>
25         <version>1.0.0-SNAPSHOT</version>
26     </parent>
27
28     <artifactId>holmes-engine-d</artifactId>
29     <name>holmes-engine-d-service</name>
30     <packaging>jar</packaging>
31
32     <properties>
33         <drools.version>5.4.0.Final</drools.version>
34     </properties>
35
36     <dependencies>
37
38         <dependency>
39             <groupId>org.onap.msb.java-sdk</groupId>
40             <artifactId>msb-java-sdk</artifactId>
41         </dependency>
42         <dependency>
43             <groupId>org.reflections</groupId>
44             <artifactId>reflections</artifactId>
45         </dependency>
46         <dependency>
47             <groupId>org.onap.holmes.dsa</groupId>
48             <artifactId>dmaap-dsa</artifactId>
49         </dependency>
50         <dependency>
51             <groupId>org.onap.holmes.common</groupId>
52             <artifactId>holmes-actions</artifactId>
53             <exclusions>
54                 <exclusion>
55                     <groupId>org.glassfish.jersey.containers</groupId>
56                     <artifactId>jersey-container-servlet-core</artifactId>
57                 </exclusion>
58             </exclusions>
59         </dependency>
60         <dependency>
61             <groupId>org.glassfish.jersey.containers</groupId>
62             <artifactId>jersey-container-servlet-core</artifactId>
63             <version>2.22.2</version>
64         </dependency>
65         <dependency>
66             <groupId>org.easymock</groupId>
67             <artifactId>easymock</artifactId>
68         </dependency>
69         <dependency>
70             <groupId>org.drools</groupId>
71             <artifactId>drools-core</artifactId>
72             <version>${drools.version}</version>
73         </dependency>
74         <dependency>
75             <groupId>org.drools</groupId>
76             <artifactId>drools-compiler</artifactId>
77             <version>${drools.version}</version>
78         </dependency>
79         <dependency>
80             <groupId>org.drools</groupId>
81             <artifactId>drools-templates</artifactId>
82             <version>${drools.version}</version>
83         </dependency>
84
85         <dependency>
86             <groupId>io.dropwizard</groupId>
87             <artifactId>dropwizard-db</artifactId>
88         </dependency>
89         <dependency>
90             <groupId>org.antlr</groupId>
91             <artifactId>stringtemplate</artifactId>
92         </dependency>
93         <dependency>
94             <groupId>io.dropwizard</groupId>
95             <artifactId>dropwizard-core</artifactId>
96             <exclusions>
97                 <exclusion>
98                     <groupId>ch.qos.logback</groupId>
99                     <artifactId>logback</artifactId>
100                 </exclusion>
101                 <exclusion>
102                     <artifactId>log4j-over-slf4j</artifactId>
103                     <groupId>org.slf4j</groupId>
104                 </exclusion>
105             </exclusions>
106         </dependency>
107         <dependency>
108             <groupId>org.projectlombok</groupId>
109             <artifactId>lombok</artifactId>
110         </dependency>
111         <dependency>
112             <groupId>org.postgresql</groupId>
113             <artifactId>postgresql</artifactId>
114         </dependency>
115         <dependency>
116             <groupId>org.quartz-scheduler</groupId>
117             <artifactId>quartz</artifactId>
118         </dependency>
119         <dependency>
120             <groupId>junit</groupId>
121             <artifactId>junit</artifactId>
122         </dependency>
123         <dependency>
124             <groupId>org.hamcrest</groupId>
125             <artifactId>hamcrest-core</artifactId>
126         </dependency>
127         <dependency>
128             <groupId>org.powermock</groupId>
129             <artifactId>powermock-module-junit4</artifactId>
130         </dependency>
131         <dependency>
132             <groupId>org.slf4j</groupId>
133             <artifactId>slf4j-api</artifactId>
134         </dependency>
135         <dependency>
136             <groupId>io.swagger</groupId>
137             <artifactId>swagger-jersey2-jaxrs</artifactId>
138             <scope>provided</scope>
139         </dependency>
140
141         <dependency>
142             <groupId>org.powermock</groupId>
143             <artifactId>powermock-api-easymock</artifactId>
144             <version>1.6.5</version>
145             <scope>test</scope>
146         </dependency>
147         <dependency>
148             <groupId>org.powermock</groupId>
149             <artifactId>powermock-module-junit4-rule</artifactId>
150             <version>1.6.5</version>
151             <scope>test</scope>
152         </dependency>
153         <dependency>
154             <groupId>org.powermock</groupId>
155             <artifactId>powermock-classloading-xstream</artifactId>
156             <version>1.6.5</version>
157             <scope>test</scope>
158         </dependency>
159
160         <dependency>
161             <groupId>org.apache.httpcomponents</groupId>
162             <artifactId>httpclient</artifactId>
163         </dependency>
164         <dependency>
165             <groupId>com.google.guava</groupId>
166             <artifactId>guava</artifactId>
167         </dependency>
168     </dependencies>
169
170     <build>
171         <plugins>
172             <plugin>
173                 <groupId>org.apache.maven.plugins</groupId>
174                 <artifactId>maven-jar-plugin</artifactId>
175                 <configuration>
176                     <archive>
177                         <manifest>
178                             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
179                         </manifest>
180                     </archive>
181                 </configuration>
182             </plugin>
183             <plugin>
184                 <groupId>org.apache.maven.plugins</groupId>
185                 <artifactId>maven-shade-plugin</artifactId>
186                 <configuration>
187                     <createDependencyReducedPom>true</createDependencyReducedPom>
188                     <filters>
189                         <filter>
190                             <artifact>*:*</artifact>
191                             <excludes>
192                                 <exclude>META-INF/*.SF</exclude>
193                                 <exclude>META-INF/*.DSA</exclude>
194                                 <exclude>META-INF/*.RSA</exclude>
195                             </excludes>
196                         </filter>
197                     </filters>
198                 </configuration>
199                 <executions>
200                     <execution>
201                         <phase>package</phase>
202                         <goals>
203                             <goal>shade</goal>
204                         </goals>
205                         <configuration>
206                             <transformers>
207                                 <transformer
208                                     implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
209                                 <transformer
210                                     implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
211                                     <mainClass>org.onap.holmes.engine.EngineDActiveApp
212                                     </mainClass>
213                                 </transformer>
214                             </transformers>
215                         </configuration>
216                     </execution>
217                 </executions>
218             </plugin>
219         </plugins>
220         <resources>
221             <resource>
222                 <directory>src/main/java</directory>
223                 <includes>
224                     <include>**/*.properties</include>
225                 </includes>
226             </resource>
227             <resource>
228                 <directory>src/main/resources</directory>
229             </resource>
230         </resources>
231     </build>
232
233     <profiles>
234         <profile>
235             <id>swagger</id>
236             <dependencies>
237                 <dependency>
238                     <groupId>io.swagger</groupId>
239                     <artifactId>swagger-jersey2-jaxrs</artifactId>
240                     <version>1.5.0</version>
241                 </dependency>
242             </dependencies>
243
244             <build>
245                 <plugins>
246                     <plugin>
247                         <groupId>com.github.kongchen</groupId>
248                         <artifactId>swagger-maven-plugin</artifactId>
249                         <version>3.1.1</version>
250                         <configuration>
251                             <apiSources>
252                                 <apiSource>
253                                     <springmvc>false</springmvc>
254                                     <locations>org.onap.holmes.engine.resources</locations>
255                                     <basePath>/api/holmes-engine-mgmt/v1/</basePath>
256                                     <info>
257                                         <title>API Descriptions for Holmes Engine Management</title>
258                                         <version>v1</version>
259                                         <description>
260                                             This page shows all the APIs available in the Holmes engine management module.
261                                         </description>
262                                         <termsOfService>
263                                             http://www.github.com/kongchen/swagger-maven-plugin
264                                         </termsOfService>
265                                         <contact>
266                                             <email>fu.guangrong@zte.com.cn</email>
267                                             <name>Guangrong Fu</name>
268                                         </contact>
269                                         <license>
270                                             <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
271                                             <name>Apache 2.0</name>
272                                         </license>
273                                     </info>
274                                     <securityDefinitions>
275                                     </securityDefinitions>
276                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
277                                 </apiSource>
278                             </apiSources>
279                         </configuration>
280                         <executions>
281                             <execution>
282                                 <phase>compile</phase>
283                                 <goals>
284                                     <goal>generate</goal>
285                                 </goals>
286                             </execution>
287                         </executions>
288                         <dependencies>
289                             <dependency>
290                                 <groupId>io.swagger</groupId>
291                                 <artifactId>swagger-hibernate-validations</artifactId>
292                                 <version>1.5.6</version>
293                             </dependency>
294                         </dependencies>
295                     </plugin>
296                 </plugins>
297             </build>
298         </profile>
299     </profiles>
300 </project>