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   ================================================================================
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17
18   SPDX-License-Identifier: Apache-2.0
19   ============LICENSE_END=========================================================
20 -->
21
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24
25     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.onap.policy.xacml-pdp</groupId>
28         <artifactId>xacml-packages</artifactId>
29         <version>2.6.4</version>
30     </parent>
31
32     <packaging>pom</packaging>
33     <artifactId>policy-xacmlpdp-docker</artifactId>
34
35     <name>${project.artifactId}</name>
36     <description>Creates Policy Xacml PDP docker images</description>
37
38     <properties>
39         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
41         <dist.project.version>${project.version}</dist.project.version>
42         <docker.skip>false</docker.skip>
43         <docker.skip.build>false</docker.skip.build>
44         <docker.skip.push>false</docker.skip.push>
45         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
46     </properties>
47
48     <build>
49         <finalName>${project.artifactId}-${project.version}</finalName>
50         <plugins>
51             <plugin>
52                 <groupId>org.codehaus.gmaven</groupId>
53                 <artifactId>groovy-maven-plugin</artifactId>
54                 <version>2.1.1</version>
55                 <executions>
56                     <execution>
57                         <phase>validate</phase>
58                         <goals>
59                             <goal>execute</goal>
60                         </goals>
61                         <configuration>
62                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
63                         </configuration>
64                     </execution>
65                 </executions>
66             </plugin>
67
68             <plugin>
69                 <groupId>io.fabric8</groupId>
70                 <artifactId>docker-maven-plugin</artifactId>
71
72                 <configuration>
73                     <verbose>true</verbose>
74                     <apiVersion>1.23</apiVersion>
75                     <pullRegistry>${docker.pull.registry}</pullRegistry>
76                     <pushRegistry>${docker.push.registry}</pushRegistry>
77
78                     <images>
79                         <image>
80                             <name>onap/policy-xacml-pdp:${project.version}</name>
81                             <build>
82                                 <cleanup>try</cleanup>
83                                 <dockerFile>Dockerfile</dockerFile>
84                                 <tags>
85                                     <tag>${project.version}-${maven.build.timestamp}</tag>
86                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
87                                 </tags>
88                                 <assembly>
89                                     <inline>
90                                         <dependencySets>
91                                             <dependencySet>
92                                                 <includes>
93                                                     <include>org.onap.policy.xacml-pdp:policy-xacmlpdp-tarball</include>
94                                                 </includes>
95                                                 <outputDirectory>/lib</outputDirectory>
96                                                 <outputFileNameMapping>policy-xacmlpdp.tar.gz</outputFileNameMapping>
97                                             </dependencySet>
98                                         </dependencySets>
99                                     </inline>
100                                 </assembly>
101                             </build>
102                         </image>
103                     </images>
104                 </configuration>
105
106                 <executions>
107                     <execution>
108                         <id>clean-images</id>
109                         <phase>pre-clean</phase>
110                         <goals>
111                             <goal>remove</goal>
112                         </goals>
113                         <configuration>
114                             <removeAll>true</removeAll>
115                         </configuration>
116                     </execution>
117
118                     <execution>
119                         <id>generate-images</id>
120                         <phase>generate-sources</phase>
121                         <goals>
122                             <goal>build</goal>
123                         </goals>
124                     </execution>
125
126                     <execution>
127                         <id>push-images</id>
128                         <phase>deploy</phase>
129                         <goals>
130                             <goal>build</goal>
131                             <goal>push</goal>
132                         </goals>
133                         <configuration>
134                             <image>onap/policy-xacml-pdp</image>
135                         </configuration>
136                     </execution>
137                 </executions>
138             </plugin>
139
140             <plugin>
141                 <groupId>org.apache.maven.plugins</groupId>
142                 <artifactId>maven-deploy-plugin</artifactId>
143                 <configuration>
144                     <skip>true</skip>
145                 </configuration>
146             </plugin>
147         </plugins>
148     </build>
149
150     <dependencies>
151         <dependency>
152             <groupId>org.onap.policy.xacml-pdp</groupId>
153             <artifactId>policy-xacmlpdp-tarball</artifactId>
154             <version>${project.version}</version>
155             <classifier>tarball</classifier>
156             <type>tar.gz</type>
157         </dependency>
158     </dependencies>
159 </project>