Update snapshot of policy/pap to 2.6.1-SNAPSHOT
[policy/pap.git] / packages / policy-pap-docker / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2019 Nordix Foundation.
4    Modifications Copyright (C) 2020 Bell Canada.
5    Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
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     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.onap.policy.pap</groupId>
28         <artifactId>pap-packages</artifactId>
29         <version>2.6.1-SNAPSHOT</version>
30     </parent>
31
32     <artifactId>policy-pap-docker</artifactId>
33     <packaging>pom</packaging>
34
35     <name>${project.artifactId}</name>
36     <description>The module for creating docker images of PAP component.</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-pap</name>
81                             <build>
82                                 <cleanup>try</cleanup>
83                                 <dockerFile>Dockerfile</dockerFile>
84                                 <tags>
85                                     <tag>${project.version}</tag>
86                                     <tag>${project.version}-${maven.build.timestamp}</tag>
87                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
88                                 </tags>
89                                 <assembly>
90                                     <inline>
91                                         <dependencySets>
92                                             <dependencySet>
93                                                 <includes>
94                                                     <include>org.onap.policy.pap:policy-pap-tarball</include>
95                                                 </includes>
96                                                 <outputDirectory>/lib</outputDirectory>
97                                                 <outputFileNameMapping>policy-pap.tar.gz</outputFileNameMapping>
98                                             </dependencySet>
99                                         </dependencySets>
100                                     </inline>
101                                 </assembly>
102                             </build>
103                         </image>
104                     </images>
105                 </configuration>
106
107                 <executions>
108                     <execution>
109                         <id>clean-images</id>
110                         <phase>pre-clean</phase>
111                         <goals>
112                             <goal>remove</goal>
113                         </goals>
114                         <configuration>
115                             <removeAll>true</removeAll>
116                         </configuration>
117                     </execution>
118
119                     <execution>
120                         <id>generate-images</id>
121                         <phase>generate-sources</phase>
122                         <goals>
123                             <goal>build</goal>
124                         </goals>
125                     </execution>
126
127                     <execution>
128                         <id>push-images</id>
129                         <phase>deploy</phase>
130                         <goals>
131                             <goal>build</goal>
132                             <goal>push</goal>
133                         </goals>
134                         <configuration>
135                             <image>onap/policy-pap</image>
136                         </configuration>
137                     </execution>
138                 </executions>
139             </plugin>
140
141             <plugin>
142                 <groupId>org.apache.maven.plugins</groupId>
143                 <artifactId>maven-deploy-plugin</artifactId>
144                 <configuration>
145                     <skip>true</skip>
146                 </configuration>
147             </plugin>
148         </plugins>
149     </build>
150
151     <dependencies>
152         <dependency>
153             <groupId>org.onap.policy.pap</groupId>
154             <artifactId>policy-pap-tarball</artifactId>
155             <version>${project.version}</version>
156             <classifier>tarball</classifier>
157             <type>tar.gz</type>
158         </dependency>
159     </dependencies>
160 </project>