e030b774ce797ba449e26f421f46267b21d0ec95
[policy/pap.git] / main / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2019, 2023 Nordix Foundation.
4    Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
5    Modifications Copyright (C) 2020-2023 Bell Canada.
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10
11        http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18
19   SPDX-License-Identifier: Apache-2.0
20   ============LICENSE_END=========================================================
21 -->
22
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24     <modelVersion>4.0.0</modelVersion>
25     <parent>
26         <groupId>org.onap.policy.pap</groupId>
27         <artifactId>policy-pap</artifactId>
28         <version>3.1.2-SNAPSHOT</version>
29     </parent>
30
31     <artifactId>pap-main</artifactId>
32
33     <name>${project.artifactId}</name>
34     <description>The main module of Policy Administration Backend that handles startup, lifecycle management, and parameters.</description>
35
36     <dependencies>
37         <dependency>
38             <groupId>org.onap.policy.common</groupId>
39             <artifactId>policy-endpoints</artifactId>
40             <version>${policy.common.version}</version>
41         </dependency>
42         <dependency>
43             <groupId>org.onap.policy.models</groupId>
44             <artifactId>policy-models-pap</artifactId>
45             <version>${policy.models.version}</version>
46         </dependency>
47         <dependency>
48             <groupId>org.onap.policy.models</groupId>
49             <artifactId>policy-models-pdp</artifactId>
50             <version>${policy.models.version}</version>
51         </dependency>
52         <dependency>
53             <groupId>org.onap.policy.common</groupId>
54             <artifactId>spring-utils</artifactId>
55             <version>${policy.common.version}</version>
56         </dependency>
57         <dependency>
58             <groupId>org.onap.policy.common</groupId>
59             <artifactId>utils-test</artifactId>
60             <version>${policy.common.version}</version>
61             <scope>test</scope>
62         </dependency>
63
64         <dependency>
65             <groupId>org.springframework.boot</groupId>
66             <artifactId>spring-boot-starter-web</artifactId>
67         </dependency>
68         <dependency>
69             <groupId>org.springframework.boot</groupId>
70             <artifactId>spring-boot-starter-tomcat</artifactId>
71         </dependency>
72         <dependency>
73             <groupId>org.springframework.boot</groupId>
74             <artifactId>spring-boot-starter-data-jpa</artifactId>
75         </dependency>
76         <dependency>
77             <groupId>org.springframework.boot</groupId>
78             <artifactId>spring-boot-starter-security</artifactId>
79         </dependency>
80         <dependency>
81             <groupId>org.springframework.boot</groupId>
82             <artifactId>spring-boot-starter-aop</artifactId>
83         </dependency>
84         <dependency>
85             <groupId>org.springframework.boot</groupId>
86             <artifactId>spring-boot-starter-actuator</artifactId>
87         </dependency>
88         <dependency>
89             <groupId>io.micrometer</groupId>
90             <artifactId>micrometer-registry-prometheus</artifactId>
91             <scope>runtime</scope>
92         </dependency>
93         <dependency>
94             <groupId>org.apache.kafka</groupId>
95             <artifactId>kafka-clients</artifactId>
96             <scope>provided</scope>
97         </dependency>
98         <dependency>
99             <groupId>org.springdoc</groupId>
100             <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
101         </dependency>
102         <dependency>
103             <groupId>org.apache.tomcat.embed</groupId>
104             <artifactId>tomcat-embed-core</artifactId>
105         </dependency>
106
107         <dependency>
108             <groupId>org.mockito</groupId>
109             <artifactId>mockito-core</artifactId>
110             <scope>test</scope>
111         </dependency>
112         <dependency>
113             <groupId>com.h2database</groupId>
114             <artifactId>h2</artifactId>
115             <scope>test</scope>
116         </dependency>
117         <dependency>
118             <groupId>org.springframework.security</groupId>
119             <artifactId>spring-security-test</artifactId>
120             <version>${version.spring-security}</version>
121             <scope>test</scope>
122         </dependency>
123         <dependency>
124             <groupId>org.springframework.boot</groupId>
125             <artifactId>spring-boot-starter-test</artifactId>
126             <scope>test</scope>
127         </dependency>
128         <dependency>
129             <groupId>org.junit.jupiter</groupId>
130             <artifactId>junit-jupiter-engine</artifactId>
131             <scope>test</scope>
132         </dependency>
133         <dependency>
134             <groupId>org.mockito</groupId>
135             <artifactId>mockito-junit-jupiter</artifactId>
136         </dependency>
137     </dependencies>
138
139     <build>
140         <resources>
141             <!-- Output the version of the pap service -->
142             <resource>
143                 <directory>src/main/resources</directory>
144                 <filtering>true</filtering>
145                 <includes>
146                     <include>**/version.txt</include>
147                 </includes>
148             </resource>
149             <resource>
150                 <directory>src/main/resources</directory>
151                 <filtering>false</filtering>
152                 <excludes>
153                     <exclude>**/version.txt</exclude>
154                 </excludes>
155             </resource>
156         </resources>
157         <plugins>
158             <plugin>
159                 <groupId>io.swagger.codegen.v3</groupId>
160                 <artifactId>swagger-codegen-maven-plugin</artifactId>
161                 <executions>
162                     <execution>
163                         <id>code-gen</id>
164                         <goals>
165                             <goal>generate</goal>
166                         </goals>
167                         <configuration>
168                             <inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec>
169                             <invokerPackage>org.onap.policy.pap.main.rest</invokerPackage>
170                             <modelPackage>org.onap.policy.models.tosca.authorative.concepts</modelPackage>
171                             <apiPackage>org.onap.policy.pap.main.rest</apiPackage>
172                             <language>spring</language>
173                             <generateModels>false</generateModels>
174                             <generateSupportingFiles>false</generateSupportingFiles>
175                             <importMappings>
176                                 HealthCheckReport=org.onap.policy.common.endpoints.report.HealthCheckReport,
177                                 Pdps=org.onap.policy.models.pdp.concepts.Pdps,
178                                 PdpState=org.onap.policy.models.pdp.enums.PdpState,
179                                 PdpGroupUpdateResponse=org.onap.policy.models.pap.concepts.PdpGroupUpdateResponse,
180                                 PdpGroupStateChangeResponse=org.onap.policy.models.pap.concepts.PdpGroupStateChangeResponse,
181                                 PdpGroupDeleteResponse=org.onap.policy.models.pap.concepts.PdpGroupDeleteResponse,
182                                 PdpGroupDeployResponse=org.onap.policy.models.pap.concepts.PdpGroupDeployResponse,
183                                 DeploymentGroups=org.onap.policy.models.pdp.concepts.DeploymentGroups,
184                                 PdpDeployPolicies=org.onap.policy.models.pap.concepts.PdpDeployPolicies,
185                                 PdpGroups=org.onap.policy.models.pdp.concepts.PdpGroups,
186                                 PolicyAudit=org.onap.policy.models.pap.concepts.PolicyAudit,
187                                 PolicyStatus=org.onap.policy.models.pap.concepts.PolicyStatus
188                             </importMappings>
189                             <configOptions>
190                                 <sourceFolder>src/gen/java</sourceFolder>
191                                 <dateLibrary>java17</dateLibrary>
192                                 <interfaceOnly>true</interfaceOnly>
193                                 <useTags>true</useTags>
194                                 <jakarta>true</jakarta>
195                             </configOptions>
196                         </configuration>
197                     </execution>
198                 </executions>
199             </plugin>
200             <plugin>
201                 <groupId>org.springframework.boot</groupId>
202                 <artifactId>spring-boot-maven-plugin</artifactId>
203                 <version>${version.springboot}</version>
204                 <executions>
205                     <execution>
206                         <goals>
207                             <goal>repackage</goal>
208                         </goals>
209                         <phase>package</phase>
210                     </execution>
211                 </executions>
212             </plugin>
213         </plugins>
214     </build>
215 </project>