Set snapshot and/or references of policy/pap for new release
[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>3.0.0-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                 <executions>
158                     <execution>
159                         <id>code-gen</id>
160                         <goals>
161                             <goal>generate</goal>
162                         </goals>
163                         <configuration>
164                             <inputSpec>${project.basedir}/src/main/resources/openapi/openapi.yaml</inputSpec>
165                             <invokerPackage>org.onap.policy.pap.main.rest</invokerPackage>
166                             <modelPackage>org.onap.policy.models.tosca.authorative.concepts</modelPackage>
167                             <apiPackage>org.onap.policy.pap.main.rest</apiPackage>
168                             <language>spring</language>
169                             <generateModels>false</generateModels>
170                             <generateSupportingFiles>false</generateSupportingFiles>
171                             <importMappings>
172                                 HealthCheckReport=org.onap.policy.common.endpoints.report.HealthCheckReport,
173                                 StatisticsReport=org.onap.policy.pap.main.rest.StatisticsReport,
174                                 PdpStatistics=org.onap.policy.models.pdp.concepts.PdpStatistics,
175                                 Pdps=org.onap.policy.models.pdp.concepts.Pdps,
176                                 PdpState=org.onap.policy.models.pdp.enums.PdpState,
177                                 PdpGroupUpdateResponse=org.onap.policy.models.pap.concepts.PdpGroupUpdateResponse,
178                                 PdpGroupStateChangeResponse=org.onap.policy.models.pap.concepts.PdpGroupStateChangeResponse,
179                                 PdpGroupDeleteResponse=org.onap.policy.models.pap.concepts.PdpGroupDeleteResponse,
180                                 PdpGroupDeployResponse=org.onap.policy.models.pap.concepts.PdpGroupDeployResponse,
181                                 DeploymentGroups=org.onap.policy.models.pdp.concepts.DeploymentGroups,
182                                 PdpDeployPolicies=org.onap.policy.models.pap.concepts.PdpDeployPolicies,
183                                 PdpGroups=org.onap.policy.models.pdp.concepts.PdpGroups,
184                                 PolicyAudit=org.onap.policy.models.pap.concepts.PolicyAudit,
185                                 PolicyStatus=org.onap.policy.models.pap.concepts.PolicyStatus
186                             </importMappings>
187                             <typeMappings>
188                                 PdpStatistics=org.onap.policy.models.pdp.concepts.PdpStatistics
189                             </typeMappings>
190                             <configOptions>
191                                 <sourceFolder>src/gen/java</sourceFolder>
192                                 <dateLibrary>java11</dateLibrary>
193                                 <interfaceOnly>true</interfaceOnly>
194                                 <useTags>true</useTags>
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                 <executions>
204                     <execution>
205                         <goals>
206                             <goal>repackage</goal>
207                         </goals>
208                         <phase>package</phase>
209                     </execution>
210                 </executions>
211             </plugin>
212         </plugins>
213     </build>
214 </project>