OpenSuse docker file for 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-SNAPSHOT</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         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
47     </properties>
48
49     <build>
50         <finalName>${project.artifactId}-${project.version}</finalName>
51         <plugins>
52             <plugin>
53                 <groupId>org.codehaus.gmaven</groupId>
54                 <artifactId>groovy-maven-plugin</artifactId>
55                 <version>2.1.1</version>
56                 <executions>
57                     <execution>
58                         <phase>validate</phase>
59                         <goals>
60                             <goal>execute</goal>
61                         </goals>
62                         <configuration>
63                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
64                         </configuration>
65                     </execution>
66                 </executions>
67             </plugin>
68
69             <plugin>
70                 <groupId>io.fabric8</groupId>
71                 <artifactId>docker-maven-plugin</artifactId>
72
73                 <configuration>
74                     <verbose>true</verbose>
75                     <apiVersion>1.23</apiVersion>
76                     <pullRegistry>${docker.pull.registry}</pullRegistry>
77                     <pushRegistry>${docker.push.registry}</pushRegistry>
78
79                     <images>
80                         <image>
81                             <name>onap/policy-xacml-pdp</name>
82                             <build>
83                                 <cleanup>try</cleanup>
84                                 <dockerFile>${dockerFile}</dockerFile>
85                                 <tags>
86                                     <tag>${project.version}</tag>
87                                     <tag>${project.version}-${maven.build.timestamp}</tag>
88                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
89                                 </tags>
90                                 <assembly>
91                                     <inline>
92                                         <dependencySets>
93                                             <dependencySet>
94                                                 <includes>
95                                                     <include>org.onap.policy.xacml-pdp:policy-xacmlpdp-tarball</include>
96                                                 </includes>
97                                                 <outputDirectory>/lib</outputDirectory>
98                                                 <outputFileNameMapping>policy-xacmlpdp.tar.gz</outputFileNameMapping>
99                                             </dependencySet>
100                                         </dependencySets>
101                                     </inline>
102                                 </assembly>
103                             </build>
104                         </image>
105                     </images>
106                 </configuration>
107
108                 <executions>
109                     <execution>
110                         <id>clean-images</id>
111                         <phase>pre-clean</phase>
112                         <goals>
113                             <goal>remove</goal>
114                         </goals>
115                         <configuration>
116                             <removeAll>true</removeAll>
117                         </configuration>
118                     </execution>
119
120                     <execution>
121                         <id>generate-images</id>
122                         <phase>generate-sources</phase>
123                         <goals>
124                             <goal>build</goal>
125                         </goals>
126                     </execution>
127
128                     <execution>
129                         <id>push-images</id>
130                         <phase>deploy</phase>
131                         <goals>
132                             <goal>build</goal>
133                             <goal>push</goal>
134                         </goals>
135                         <configuration>
136                             <image>onap/policy-xacml-pdp</image>
137                         </configuration>
138                     </execution>
139                 </executions>
140             </plugin>
141
142             <plugin>
143                 <groupId>org.apache.maven.plugins</groupId>
144                 <artifactId>maven-deploy-plugin</artifactId>
145                 <configuration>
146                     <skip>true</skip>
147                 </configuration>
148             </plugin>
149         </plugins>
150     </build>
151
152     <dependencies>
153         <dependency>
154             <groupId>org.onap.policy.xacml-pdp</groupId>
155             <artifactId>policy-xacmlpdp-tarball</artifactId>
156             <version>${project.version}</version>
157             <classifier>tarball</classifier>
158             <type>tar.gz</type>
159         </dependency>
160     </dependencies>
161 </project>