Update snapshot and/or references of policy/drools-pdp to latest snapshots
[policy/drools-pdp.git] / packages / docker / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3   ONAP Policy Engine - Docker files
4   ================================================================================
5   Copyright (C) 2017-2018, 2021 AT&T Intellectual Property. All rights reserved.
6   Modifications Copyright (C) 2019-2020 Bell Canada.
7   Modifications Copyright (C) 2022 Nordix Foundation.
8   ================================================================================
9   Licensed under the Apache License, Version 2.0 (the "License");
10   you may not use this file except in compliance with the License.
11   You may obtain a copy of the License at
12
13          http://www.apache.org/licenses/LICENSE-2.0
14
15   Unless required by applicable law or agreed to in writing, software
16   distributed under the License is distributed on an "AS IS" BASIS,
17   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18   See the License for the specific language governing permissions and
19   limitations under the License.
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.drools-pdp</groupId>
29         <artifactId>drools-packages</artifactId>
30         <version>1.11.1-SNAPSHOT</version>
31     </parent>
32
33     <artifactId>docker</artifactId>
34     <packaging>pom</packaging>
35     <name>Policy Drools PDP - Docker build</name>
36     <description>ONAP Policy Drools PDP Docker Build</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         <docker.skip.deployconfig>true</docker.skip.deployconfig>
46         <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
47         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
48         <docker.buildArg.BUILD_VERSION_DROOLS>${project.version}</docker.buildArg.BUILD_VERSION_DROOLS>
49         <docker.buildArg.MVN_SNAPSHOT_REPO_URL>${nexusproxy}/${snapshots.path}</docker.buildArg.MVN_SNAPSHOT_REPO_URL>
50         <docker.buildArg.MVN_RELEASE_REPO_URL>${nexusproxy}/${releases.path}</docker.buildArg.MVN_RELEASE_REPO_URL>
51     </properties>
52
53     <build>
54         <finalName>${project.artifactId}-${project.version}</finalName>
55         <plugins>
56             <plugin>
57                 <groupId>org.codehaus.gmaven</groupId>
58                 <artifactId>groovy-maven-plugin</artifactId>
59                 <version>2.1.1</version>
60                 <executions>
61                     <execution>
62                         <phase>validate</phase>
63                         <goals>
64                             <goal>execute</goal>
65                         </goals>
66                         <configuration>
67                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
68                         </configuration>
69                     </execution>
70                 </executions>
71             </plugin>
72
73             <plugin>
74                 <groupId>io.github.git-commit-id</groupId>
75                 <artifactId>git-commit-id-maven-plugin</artifactId>
76                 <version>5.0.0</version>
77                 <executions>
78                     <execution>
79                         <id>get-the-git-infos</id>
80                         <goals>
81                             <goal>revision</goal>
82                         </goals>
83                         <phase>initialize</phase>
84                     </execution>
85                 </executions>
86                 <configuration>
87                     <skipPoms>false</skipPoms>
88                     <generateGitPropertiesFile>true</generateGitPropertiesFile>
89                     <includeOnlyProperties>
90                         <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
91                         <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
92                     </includeOnlyProperties>
93                     <commitIdGenerationMode>full</commitIdGenerationMode>
94                 </configuration>
95             </plugin>
96
97             <plugin>
98                 <groupId>io.fabric8</groupId>
99                 <artifactId>docker-maven-plugin</artifactId>
100                 <configuration>
101                     <verbose>true</verbose>
102                     <apiVersion>1.23</apiVersion>
103                     <pullRegistry>${docker.pull.registry}</pullRegistry>
104                     <pushRegistry>${docker.push.registry}</pushRegistry>
105                     <images>
106                         <image>
107                             <name>onap/policy-drools</name>
108                             <build>
109                                 <cleanup>try</cleanup>
110                                 <dockerFile>${dockerFile}</dockerFile>
111                                 <contextDir>${docker.contextDir}</contextDir>
112                                 <tags>
113                                     <tag>${project.version}</tag>
114                                     <tag>${project.version}-${maven.build.timestamp}</tag>
115                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
116                                 </tags>
117                                 <assembly>
118                                     <inline>
119                                         <dependencySets>
120                                             <dependencySet>
121                                                 <includes>
122                                                     <include>org.onap.policy.drools-pdp:install-drools</include>
123                                                 </includes>
124                                                 <outputDirectory>.</outputDirectory>
125                                                 <outputFileNameMapping>install-drools.zip</outputFileNameMapping>
126                                             </dependencySet>
127                                         </dependencySets>
128                                     </inline>
129                                 </assembly>
130                             </build>
131                         </image>
132                     </images>
133                 </configuration>
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                     <execution>
146                         <id>generate-images</id>
147                         <phase>generate-sources</phase>
148                         <goals>
149                             <goal>build</goal>
150                         </goals>
151                     </execution>
152                     <execution>
153                         <id>push-images</id>
154                         <phase>deploy</phase>
155                         <goals>
156                             <goal>build</goal>
157                             <goal>push</goal>
158                         </goals>
159                     </execution>
160                 </executions>
161             </plugin>
162             <plugin>
163                 <groupId>org.apache.maven.plugins</groupId>
164                 <artifactId>maven-deploy-plugin</artifactId>
165                 <configuration>
166                     <skip>${docker.skip.deployconfig}</skip>
167                 </configuration>
168             </plugin>
169         </plugins>
170     </build>
171     <dependencies>
172         <dependency>
173             <groupId>${project.groupId}</groupId>
174             <artifactId>install-drools</artifactId>
175             <version>${project.version}</version>
176             <type>zip</type>
177         </dependency>
178     </dependencies>
179 </project>