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 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>2.7.0</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                 <version>5.0.0</version>
74                 <executions>
75                     <execution>
76                         <id>get-the-git-infos</id>
77                         <goals>
78                             <goal>revision</goal>
79                         </goals>
80                         <phase>initialize</phase>
81                     </execution>
82                 </executions>
83                 <configuration>
84                     <skipPoms>false</skipPoms>
85                     <generateGitPropertiesFile>true</generateGitPropertiesFile>
86                     <includeOnlyProperties>
87                         <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
88                         <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
89                     </includeOnlyProperties>
90                     <commitIdGenerationMode>full</commitIdGenerationMode>
91                 </configuration>
92             </plugin>
93
94             <plugin>
95                 <groupId>io.fabric8</groupId>
96                 <artifactId>docker-maven-plugin</artifactId>
97
98                 <configuration>
99                     <verbose>true</verbose>
100                     <apiVersion>1.23</apiVersion>
101                     <pullRegistry>${docker.pull.registry}</pullRegistry>
102                     <pushRegistry>${docker.push.registry}</pushRegistry>
103
104                     <images>
105                         <image>
106                             <name>onap/policy-xacml-pdp</name>
107                             <build>
108                                 <cleanup>try</cleanup>
109                                 <dockerFile>${dockerFile}</dockerFile>
110                                 <contextDir>${docker.contextDir}</contextDir>
111                                 <tags>
112                                     <tag>${project.version}</tag>
113                                     <tag>${project.version}-${maven.build.timestamp}</tag>
114                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
115                                 </tags>
116                                 <assembly>
117                                     <inline>
118                                         <dependencySets>
119                                             <dependencySet>
120                                                 <includes>
121                                                     <include>org.onap.policy.xacml-pdp:policy-xacmlpdp-tarball</include>
122                                                 </includes>
123                                                 <outputDirectory>/lib</outputDirectory>
124                                                 <outputFileNameMapping>policy-xacmlpdp.tar.gz</outputFileNameMapping>
125                                             </dependencySet>
126                                         </dependencySets>
127                                     </inline>
128                                 </assembly>
129                             </build>
130                         </image>
131                     </images>
132                 </configuration>
133
134                 <executions>
135                     <execution>
136                         <id>clean-images</id>
137                         <phase>pre-clean</phase>
138                         <goals>
139                             <goal>remove</goal>
140                         </goals>
141                         <configuration>
142                             <removeAll>true</removeAll>
143                         </configuration>
144                     </execution>
145
146                     <execution>
147                         <id>generate-images</id>
148                         <phase>generate-sources</phase>
149                         <goals>
150                             <goal>build</goal>
151                         </goals>
152                     </execution>
153
154                     <execution>
155                         <id>push-images</id>
156                         <phase>deploy</phase>
157                         <goals>
158                             <goal>build</goal>
159                             <goal>push</goal>
160                         </goals>
161                         <configuration>
162                             <image>onap/policy-xacml-pdp</image>
163                         </configuration>
164                     </execution>
165                 </executions>
166             </plugin>
167
168             <plugin>
169                 <groupId>org.apache.maven.plugins</groupId>
170                 <artifactId>maven-deploy-plugin</artifactId>
171                 <configuration>
172                     <skip>true</skip>
173                 </configuration>
174             </plugin>
175         </plugins>
176     </build>
177
178     <dependencies>
179         <dependency>
180             <groupId>org.onap.policy.xacml-pdp</groupId>
181             <artifactId>policy-xacmlpdp-tarball</artifactId>
182             <version>${project.version}</version>
183             <classifier>tarball</classifier>
184             <type>tar.gz</type>
185         </dependency>
186     </dependencies>
187 </project>