Migrate from DW to Springboot
[holmes/rule-management.git] / rulemgt / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright 2017-2022 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.3.6-SNAPSHOT</version>
25     </parent>
26
27     <artifactId>holmes-rulemgt</artifactId>
28     <name>holmes-rulemgt-service</name>
29     <packaging>jar</packaging>
30
31     <properties>
32         <main-class>org.onap.holmes.rulemgt.RuleActiveApp</main-class>
33         <sonar.coverage.jacoco.xmlReportPaths>
34             ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
35         </sonar.coverage.jacoco.xmlReportPaths>
36         <jacoco.version>0.8.5</jacoco.version>
37     </properties>
38
39     <build>
40         <plugins>
41             <plugin>
42                 <groupId>org.apache.maven.plugins</groupId>
43                 <artifactId>maven-compiler-plugin</artifactId>
44                 <version>3.8.0</version>
45                 <configuration>
46                     <source>8</source>
47                     <target>8</target>
48                     <release>11</release>
49                 </configuration>
50             </plugin>
51             <plugin>
52                 <groupId>org.jacoco</groupId>
53                 <artifactId>jacoco-maven-plugin</artifactId>
54                 <version>${jacoco.version}</version>
55                 <executions>
56                     <execution>
57                         <id>prepare-agent</id>
58                         <goals>
59                             <goal>prepare-agent</goal>
60                         </goals>
61                     </execution>
62                     <execution>
63                         <id>report</id>
64                         <goals>
65                             <goal>report</goal>
66                         </goals>
67                         <configuration>
68                             <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
69                             <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
70                         </configuration>
71                     </execution>
72                 </executions>
73             </plugin>
74             <plugin>
75                 <groupId>org.springframework.boot</groupId>
76                 <artifactId>spring-boot-maven-plugin</artifactId>
77                 <version>${springboot.version}</version>
78                 <executions>
79                     <execution>
80                         <goals>
81                             <goal>repackage</goal>
82                         </goals>
83                     </execution>
84                 </executions>
85                 <configuration>
86                     <mainClass>${main-class}</mainClass>
87                 </configuration>
88             </plugin>
89         </plugins>
90         <resources>
91             <resource>
92                 <directory>src/main/java</directory>
93                 <includes>
94                     <include>**/*.properties</include>
95                 </includes>
96             </resource>
97             <resource>
98                 <directory>src/main/resources</directory>
99             </resource>
100         </resources>
101     </build>
102
103     <profiles>
104         <profile>
105             <id>swagger</id>
106             <dependencies>
107                 <dependency>
108                     <groupId>io.swagger</groupId>
109                     <artifactId>swagger-jersey2-jaxrs</artifactId>
110                     <version>1.5.3</version>
111                     <exclusions>
112                         <exclusion>
113                             <groupId>com.fasterxml.jackson.core</groupId>
114                             <artifactId>jackson-databind</artifactId>
115                         </exclusion>
116                         <exclusion>
117                             <groupId>com.fasterxml.jackson.core</groupId>
118                             <artifactId>jackson-core</artifactId>
119                         </exclusion>
120                     </exclusions>
121                 </dependency>
122             </dependencies>
123             <build>
124                 <plugins>
125                     <plugin>
126                         <groupId>com.github.kongchen</groupId>
127                         <artifactId>swagger-maven-plugin</artifactId>
128                         <version>3.1.1</version>
129                         <configuration>
130                             <apiSources>
131                                 <apiSource>
132                                     <springmvc>false</springmvc>
133                                     <locations>org.onap.holmes.rulemgt.resources</locations>
134                                     <basePath>/api/holmes-rule-mgmt/v1/</basePath>
135                                     <info>
136                                         <title>API Descriptions for Holmes Rule Management</title>
137                                         <version>v1</version>
138                                         <description>
139                                             This page shows all the APIs available in the Holmes rule management module.
140                                         </description>
141                                         <termsOfService>
142                                             http://www.github.com/kongchen/swagger-maven-plugin
143                                         </termsOfService>
144                                         <contact>
145                                             <email>fu.guangrong@zte.com.cn</email>
146                                             <name>Guangrong Fu</name>
147                                         </contact>
148                                         <license>
149                                             <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
150                                             <name>Apache 2.0</name>
151                                         </license>
152                                     </info>
153                                     <securityDefinitions>
154                                     </securityDefinitions>
155                                     <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
156                                 </apiSource>
157                             </apiSources>
158                         </configuration>
159                         <executions>
160                             <execution>
161                                 <phase>compile</phase>
162                                 <goals>
163                                     <goal>generate</goal>
164                                 </goals>
165                             </execution>
166                         </executions>
167                         <dependencies>
168                             <dependency>
169                                 <groupId>io.swagger</groupId>
170                                 <artifactId>swagger-hibernate-validations</artifactId>
171                                 <version>1.5.6</version>
172                             </dependency>
173                         </dependencies>
174                     </plugin>
175                 </plugins>
176             </build>
177         </profile>
178     </profiles>
179 </project>