Release policy/xacml-pdp
[policy/xacml-pdp.git] / packages / policy-xacmlpdp-docker / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
4    Modifications Copyright (C) 2020 Bell Canada.
5    Modifications Copyright (C) 2022-2023 Nordix Foundation.
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
26     <modelVersion>4.0.0</modelVersion>
27     <parent>
28         <groupId>org.onap.policy.xacml-pdp</groupId>
29         <artifactId>xacml-packages</artifactId>
30         <version>3.1.1</version>
31     </parent>
32
33     <packaging>pom</packaging>
34     <artifactId>policy-xacmlpdp-docker</artifactId>
35
36     <name>${project.artifactId}</name>
37     <description>Creates Policy Xacml PDP docker images</description>
38
39     <properties>
40         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
42         <dist.project.version>${project.version}</dist.project.version>
43         <docker.skip>false</docker.skip>
44         <docker.skip.build>false</docker.skip.build>
45         <docker.skip.push>false</docker.skip.push>
46         <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
47         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
48     </properties>
49
50     <build>
51         <finalName>${project.artifactId}-${project.version}</finalName>
52         <plugins>
53             <plugin>
54                 <groupId>org.codehaus.gmaven</groupId>
55                 <artifactId>groovy-maven-plugin</artifactId>
56                 <version>2.1.1</version>
57                 <executions>
58                     <execution>
59                         <phase>validate</phase>
60                         <goals>
61                             <goal>execute</goal>
62                         </goals>
63                         <configuration>
64                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
65                         </configuration>
66                     </execution>
67                 </executions>
68             </plugin>
69
70             <plugin>
71                 <groupId>io.github.git-commit-id</groupId>
72                 <artifactId>git-commit-id-maven-plugin</artifactId>
73             </plugin>
74
75             <plugin>
76                 <groupId>io.fabric8</groupId>
77                 <artifactId>docker-maven-plugin</artifactId>
78
79                 <configuration>
80                     <verbose>true</verbose>
81                     <apiVersion>1.23</apiVersion>
82                     <pullRegistry>${docker.pull.registry}</pullRegistry>
83                     <pushRegistry>${docker.push.registry}</pushRegistry>
84
85                     <images>
86                         <image>
87                             <name>onap/policy-xacml-pdp</name>
88                             <build>
89                                 <cleanup>try</cleanup>
90                                 <dockerFile>${dockerFile}</dockerFile>
91                                 <contextDir>${docker.contextDir}</contextDir>
92                                 <tags>
93                                     <tag>${project.version}</tag>
94                                     <tag>${project.version}-${maven.build.timestamp}</tag>
95                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
96                                 </tags>
97                                 <assembly>
98                                     <inline>
99                                         <dependencySets>
100                                             <dependencySet>
101                                                 <includes>
102                                                     <include>org.onap.policy.xacml-pdp:policy-xacmlpdp-tarball</include>
103                                                 </includes>
104                                                 <outputDirectory>/lib</outputDirectory>
105                                                 <outputFileNameMapping>policy-xacmlpdp.tar.gz</outputFileNameMapping>
106                                             </dependencySet>
107                                         </dependencySets>
108                                     </inline>
109                                 </assembly>
110                             </build>
111                         </image>
112                     </images>
113                 </configuration>
114
115                 <executions>
116                     <execution>
117                         <id>clean-images</id>
118                         <phase>pre-clean</phase>
119                         <goals>
120                             <goal>remove</goal>
121                         </goals>
122                         <configuration>
123                             <removeAll>true</removeAll>
124                         </configuration>
125                     </execution>
126
127                     <execution>
128                         <id>generate-images</id>
129                         <phase>generate-sources</phase>
130                         <goals>
131                             <goal>build</goal>
132                         </goals>
133                     </execution>
134
135                     <execution>
136                         <id>push-images</id>
137                         <phase>deploy</phase>
138                         <goals>
139                             <goal>build</goal>
140                             <goal>push</goal>
141                         </goals>
142                         <configuration>
143                             <image>onap/policy-xacml-pdp</image>
144                         </configuration>
145                     </execution>
146                 </executions>
147             </plugin>
148
149             <plugin>
150                 <groupId>org.apache.maven.plugins</groupId>
151                 <artifactId>maven-deploy-plugin</artifactId>
152                 <configuration>
153                     <skip>true</skip>
154                 </configuration>
155             </plugin>
156         </plugins>
157     </build>
158
159     <dependencies>
160         <dependency>
161             <groupId>org.onap.policy.xacml-pdp</groupId>
162             <artifactId>policy-xacmlpdp-tarball</artifactId>
163             <version>${project.version}</version>
164             <classifier>tarball</classifier>
165             <type>tar.gz</type>
166         </dependency>
167     </dependencies>
168 </project>