Update snapshot and/or references of policy/docker to latest snapshots
[policy/docker.git] / policy-jre / alpine / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2019 Ericsson, Tieto. All rights reserved.
4    Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
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" 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
27     <parent>
28         <groupId>org.onap.policy.docker</groupId>
29         <artifactId>policy-jre</artifactId>
30         <version>2.5.2-SNAPSHOT</version>
31     </parent>
32
33     <packaging>pom</packaging>
34     <artifactId>policy-jre-alpine</artifactId>
35     <name>Policy alpine jre docker image</name>
36     <description>Policy alpine jre docker image</description>
37
38     <properties>
39         <docker.jre.imagename>onap/policy-jre-alpine</docker.jre.imagename>
40         <integration.java.name>onap/integration-java11</integration.java.name>
41         <integration.java.version>9.0.0</integration.java.version>
42     </properties>
43
44     <profiles>
45         <profile>
46             <!-- This profile is activated on Apple M1 architecture to generate the ONAP base images locally -->
47             <id>baseImage</id>
48             <activation>
49                 <os>
50                     <arch>aarch64</arch>
51                 </os>
52             </activation>
53             <build>
54                 <plugins>
55                     <plugin>
56                         <groupId>org.apache.maven.plugins</groupId>
57                         <artifactId>maven-scm-plugin</artifactId>
58                         <version>1.13.0</version>
59                         <dependencies>
60                             <dependency>
61                                 <groupId>org.codehaus.plexus</groupId>
62                                 <artifactId>plexus-utils</artifactId>
63                                 <version>3.4.2</version>
64                             </dependency>
65                             <dependency>
66                                 <groupId>org.apache.maven.scm</groupId>
67                                 <artifactId>maven-scm-provider-gitexe</artifactId>
68                                 <version>1.13.0</version>
69                             </dependency>
70                         </dependencies>
71                         <configuration>
72                             <connectionType>connection</connectionType>
73                             <checkoutDirectory>src/main/resources/meta</checkoutDirectory>
74                         </configuration>
75                         <executions>
76                             <execution>
77                                 <id>checkout-onap-python</id>
78                                 <phase>validate</phase>
79                                 <configuration>
80                                     <connectionUrl>scm:git:https://gerrit.onap.org/r/integration/docker/onap-java11</connectionUrl>
81                                     <checkoutDirectory>${project.build.directory}/onap-java11</checkoutDirectory>
82                                 </configuration>
83                                 <goals>
84                                     <goal>checkout</goal>
85                                 </goals>
86                             </execution>
87                         </executions>
88                     </plugin>
89                     <plugin>
90                         <groupId>io.fabric8</groupId>
91                         <artifactId>docker-maven-plugin</artifactId>
92
93                         <executions>
94                             <execution>
95                                 <id>generate-base-image</id>
96                                 <phase>initialize</phase>
97                                 <configuration>
98                                     <verbose>true</verbose>
99                                     <apiVersion>1.23</apiVersion>
100                                     <pullRegistry>${docker.pull.registry}</pullRegistry>
101                                     <pushRegistry>${docker.push.registry}</pushRegistry>
102                                     <images>
103                                         <image>
104                                             <name>${integration.java.name}</name>
105                                             <build>
106                                                 <cleanup>try</cleanup>
107                                                 <contextDir>${project.build.directory}/onap-java11</contextDir>
108                                                 <dockerFile>BareAlpine.Dockerfile</dockerFile>
109                                                 <tags>
110                                                     <tag>${integration.java.version}</tag>
111                                                     <tag>${integration.java.version}-${maven.build.timestamp}</tag>
112                                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
113                                                 </tags>
114                                             </build>
115                                         </image>
116                                     </images>
117                                 </configuration>
118                                 <goals>
119                                     <goal>build</goal>
120                                 </goals>
121                             </execution>
122                         </executions>
123                     </plugin>
124                 </plugins>
125             </build>
126         </profile>
127     </profiles>
128
129     <build>
130         <finalName>${project.artifactId}-${project.version}</finalName>
131         <plugins>
132             <plugin>
133                 <groupId>org.codehaus.gmaven</groupId>
134                 <artifactId>groovy-maven-plugin</artifactId>
135                 <version>2.1.1</version>
136                 <executions>
137                     <execution>
138                         <phase>prepare-package</phase>
139                         <goals>
140                             <goal>execute</goal>
141                         </goals>
142                         <configuration>
143                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
144                         </configuration>
145                     </execution>
146                 </executions>
147             </plugin>
148             <plugin>
149                 <groupId>io.github.git-commit-id</groupId>
150                 <artifactId>git-commit-id-maven-plugin</artifactId>
151             </plugin>
152             <plugin>
153                 <groupId>io.fabric8</groupId>
154                 <artifactId>docker-maven-plugin</artifactId>
155
156                 <configuration>
157                     <verbose>true</verbose>
158                     <apiVersion>1.23</apiVersion>
159                     <pullRegistry>${docker.pull.registry}</pullRegistry>
160                     <pushRegistry>${docker.push.registry}</pushRegistry>
161                     <images>
162                         <image>
163                             <name>${docker.jre.imagename}</name>
164                             <build>
165                                 <cleanup>try</cleanup>
166                                 <dockerFile>Dockerfile</dockerFile>
167                                 <tags>
168                                     <tag>${project.version}</tag>
169                                     <tag>${project.version}-${maven.build.timestamp}</tag>
170                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
171                                 </tags>
172                                 <args>
173                                     <INTEGRATION_JAVA_NAME>${integration.java.name}</INTEGRATION_JAVA_NAME>
174                                     <INTEGRATION_JAVA_VERSION>${integration.java.version}</INTEGRATION_JAVA_VERSION>
175                                 </args>
176                             </build>
177                         </image>
178                     </images>
179                 </configuration>
180
181                 <executions>
182                     <execution>
183                         <id>clean-jre-image</id>
184                         <phase>prepare-package</phase>
185                         <goals>
186                             <goal>remove</goal>
187                         </goals>
188                         <configuration>
189                             <removeAll>true</removeAll>
190                         </configuration>
191                     </execution>
192
193                     <execution>
194                         <id>generate-jre-image</id>
195                         <phase>package</phase>
196                         <goals>
197                             <goal>build</goal>
198                         </goals>
199                     </execution>
200
201                     <execution>
202                         <id>push-jre-image</id>
203                         <phase>deploy</phase>
204                         <goals>
205                             <goal>build</goal>
206                             <goal>push</goal>
207                         </goals>
208                         <configuration>
209                             <image>${docker.jre.imagename}</image>
210                         </configuration>
211                     </execution>
212                 </executions>
213             </plugin>
214             <plugin>
215                 <groupId>org.apache.maven.plugins</groupId>
216                 <artifactId>maven-deploy-plugin</artifactId>
217                 <configuration>
218                     <skip>true</skip>
219                 </configuration>
220             </plugin>
221             <plugin>
222                 <groupId>org.apache.maven.plugins</groupId>
223                 <artifactId>maven-install-plugin</artifactId>
224                 <configuration>
225                     <skip>true</skip>
226                 </configuration>
227             </plugin>
228         </plugins>
229     </build>
230 </project>