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