1250cdcebf61456e07761d9f1b98e714e6a9fff1
[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-2022 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>2.8.1-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.springframework.boot</groupId>
39             <artifactId>spring-boot-starter-web</artifactId>
40         </dependency>
41         <dependency>
42             <groupId>org.springframework.boot</groupId>
43             <artifactId>spring-boot-starter-data-jpa</artifactId>
44         </dependency>
45         <dependency>
46             <groupId>org.springframework.boot</groupId>
47             <artifactId>spring-boot-starter-security</artifactId>
48         </dependency>
49         <dependency>
50             <groupId>org.springframework.boot</groupId>
51             <artifactId>spring-boot-starter-aop</artifactId>
52         </dependency>
53         <dependency>
54             <groupId>org.springframework.boot</groupId>
55             <artifactId>spring-boot-starter-actuator</artifactId>
56         </dependency>
57         <dependency>
58             <groupId>io.micrometer</groupId>
59             <artifactId>micrometer-registry-prometheus</artifactId>
60             <version>${version.io.micrometer}</version>
61             <scope>runtime</scope>
62         </dependency>
63         <dependency>
64             <groupId>org.apache.kafka</groupId>
65             <artifactId>kafka-clients</artifactId>
66             <scope>provided</scope>
67         </dependency>
68
69         <dependency>
70             <groupId>org.onap.policy.common</groupId>
71             <artifactId>policy-endpoints</artifactId>
72             <version>${policy.common.version}</version>
73         </dependency>
74         <dependency>
75             <groupId>org.onap.policy.models</groupId>
76             <artifactId>policy-models-pap</artifactId>
77             <version>${policy.models.version}</version>
78         </dependency>
79         <dependency>
80             <groupId>org.onap.policy.models</groupId>
81             <artifactId>policy-models-pdp</artifactId>
82             <version>${policy.models.version}</version>
83         </dependency>
84         <dependency>
85             <groupId>org.onap.policy.common</groupId>
86             <artifactId>spring-utils</artifactId>
87             <version>${policy.common.version}</version>
88         </dependency>
89         <dependency>
90             <groupId>org.onap.policy.common</groupId>
91             <artifactId>utils-test</artifactId>
92             <version>${policy.common.version}</version>
93             <scope>test</scope>
94         </dependency>
95         <dependency>
96             <groupId>org.mockito</groupId>
97             <artifactId>mockito-core</artifactId>
98             <scope>test</scope>
99         </dependency>
100         <dependency>
101             <groupId>org.springframework</groupId>
102             <artifactId>spring-test</artifactId>
103             <scope>test</scope>
104         </dependency>
105         <dependency>
106             <groupId>org.springframework.security</groupId>
107             <artifactId>spring-security-test</artifactId>
108             <scope>test</scope>
109         </dependency>
110         <dependency>
111             <groupId>com.h2database</groupId>
112             <artifactId>h2</artifactId>
113             <scope>test</scope>
114         </dependency>
115         <dependency>
116             <groupId>junit</groupId>
117             <artifactId>junit</artifactId>
118             <scope>test</scope>
119         </dependency>
120         <dependency>
121             <groupId>org.junit.vintage</groupId>
122             <artifactId>junit-vintage-engine</artifactId>
123             <scope>test</scope>
124         </dependency>
125         <dependency>
126             <groupId>org.springframework.boot</groupId>
127             <artifactId>spring-boot-starter-test</artifactId>
128         </dependency>
129         <dependency>
130             <groupId>org.springdoc</groupId>
131             <artifactId>springdoc-openapi-ui</artifactId>
132         </dependency>
133     </dependencies>
134
135     <build>
136         <resources>
137             <!-- Output the version of the pap service -->
138             <resource>
139                 <directory>src/main/resources</directory>
140                 <filtering>true</filtering>
141                 <includes>
142                     <include>**/version.txt</include>
143                 </includes>
144             </resource>
145             <resource>
146                 <directory>src/main/resources</directory>
147                 <filtering>false</filtering>
148                 <excludes>
149                     <exclude>**/version.txt</exclude>
150                 </excludes>
151             </resource>
152         </resources>
153         <plugins>
154             <plugin>
155                 <groupId>io.swagger.codegen.v3</groupId>
156                 <artifactId>swagger-codegen-maven-plugin</artifactId>
157                 <version>3.0.27</version>
158                 <executions>
159                     <execution>
160                         <id>code-gen</id>
161                         <goals>
162                             <goal>generate</goal>
163                         </goals>
164                         <configuration>
165                             <inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec>
166                             <invokerPackage>org.onap.policy.pap.main.rest</invokerPackage>
167                             <modelPackage>org.onap.policy.models.tosca.authorative.concepts</modelPackage>
168                             <apiPackage>org.onap.policy.pap.main.rest</apiPackage>
169                             <language>spring</language>
170                             <generateModels>false</generateModels>
171                             <generateSupportingFiles>false</generateSupportingFiles>
172                             <importMappings>
173                                 HealthCheckReport=org.onap.policy.common.endpoints.report.HealthCheckReport,
174                                 StatisticsReport=org.onap.policy.pap.main.rest.StatisticsReport,
175                                 PdpStatistics=org.onap.policy.models.pdp.concepts.PdpStatistics,
176                                 Pdps=org.onap.policy.models.pdp.concepts.Pdps,
177                                 PdpState=org.onap.policy.models.pdp.enums.PdpState,
178                                 PdpGroupUpdateResponse=org.onap.policy.models.pap.concepts.PdpGroupUpdateResponse,
179                                 PdpGroupStateChangeResponse=org.onap.policy.models.pap.concepts.PdpGroupStateChangeResponse,
180                                 PdpGroupDeleteResponse=org.onap.policy.models.pap.concepts.PdpGroupDeleteResponse,
181                                 PdpGroupDeployResponse=org.onap.policy.models.pap.concepts.PdpGroupDeployResponse,
182                                 DeploymentGroups=org.onap.policy.models.pdp.concepts.DeploymentGroups,
183                                 PdpDeployPolicies=org.onap.policy.models.pap.concepts.PdpDeployPolicies,
184                                 PdpGroups=org.onap.policy.models.pdp.concepts.PdpGroups,
185                                 PolicyAudit=org.onap.policy.models.pap.concepts.PolicyAudit,
186                                 PolicyStatus=org.onap.policy.models.pap.concepts.PolicyStatus
187                             </importMappings>
188                             <typeMappings>
189                                 PdpStatistics=org.onap.policy.models.pdp.concepts.PdpStatistics
190                             </typeMappings>
191                             <configOptions>
192                                 <sourceFolder>src/gen/java</sourceFolder>
193                                 <dateLibrary>java11</dateLibrary>
194                                 <interfaceOnly>true</interfaceOnly>
195                                 <useTags>true</useTags>
196                             </configOptions>
197                         </configuration>
198                     </execution>
199                 </executions>
200             </plugin>
201             <plugin>
202                 <groupId>org.springframework.boot</groupId>
203                 <artifactId>spring-boot-maven-plugin</artifactId>
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>