Update snapshot and/or references of policy/models to latest snapshots
[policy/models.git] / models-sim / packages / models-simulator-docker / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2020 Bell Canada.
4    Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
5    Modifications Copyright (C) 2022-2023 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     <modelVersion>4.0.0</modelVersion>
26     <parent>
27         <groupId>org.onap.policy.models.sim</groupId>
28         <artifactId>models-sim-packages</artifactId>
29         <version>3.1.3-SNAPSHOT</version>
30     </parent>
31
32     <artifactId>models-simulator-docker</artifactId>
33     <packaging>pom</packaging>
34
35     <name>${project.artifactId}</name>
36     <description>The module for creating docker images of Simulators 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         <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
46         <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
47         <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
48         <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
49         <!-- There is no code in this submodule, only holds interfaces. So skip sonar. -->
50         <sonar.skip>true</sonar.skip>
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                 <executions>
60                     <execution>
61                         <phase>validate</phase>
62                         <goals>
63                             <goal>execute</goal>
64                         </goals>
65                         <configuration>
66                             <source>https://github.com/onap/policy-docker/raw/master/utils/groovy/docker-tag.groovy</source>
67                         </configuration>
68                     </execution>
69                 </executions>
70             </plugin>
71
72             <plugin>
73                 <groupId>io.github.git-commit-id</groupId>
74                 <artifactId>git-commit-id-maven-plugin</artifactId>
75             </plugin>
76
77             <plugin>
78                 <groupId>io.fabric8</groupId>
79                 <artifactId>docker-maven-plugin</artifactId>
80
81                 <configuration>
82                     <verbose>true</verbose>
83                     <apiVersion>1.23</apiVersion>
84                     <pullRegistry>${docker.pull.registry}</pullRegistry>
85                     <pushRegistry>${docker.push.registry}</pushRegistry>
86
87                     <images>
88                         <image>
89                             <name>onap/policy-models-simulator</name>
90                             <build>
91                                 <cleanup>try</cleanup>
92                                 <dockerFile>${dockerFile}</dockerFile>
93                                 <contextDir>${docker.contextDir}</contextDir>
94                                 <tags>
95                                     <tag>${project.version}</tag>
96                                     <tag>${project.version}-${maven.build.timestamp}</tag>
97                                     <tag>${project.docker.latest.minmax.tag.version}</tag>
98                                 </tags>
99                                 <assembly>
100                                     <inline>
101                                         <dependencySets>
102                                             <dependencySet>
103                                                 <includes>
104                                                     <include>org.onap.policy.models.sim:models-simulator-tarball
105                                                     </include>
106                                                 </includes>
107                                                 <outputDirectory>/lib</outputDirectory>
108                                                 <outputFileNameMapping>models-simulator.tar.gz</outputFileNameMapping>
109                                             </dependencySet>
110                                         </dependencySets>
111                                     </inline>
112                                 </assembly>
113                             </build>
114                         </image>
115                     </images>
116                 </configuration>
117
118                 <executions>
119                     <execution>
120                         <id>clean-images</id>
121                         <phase>pre-clean</phase>
122                         <goals>
123                             <goal>remove</goal>
124                         </goals>
125                         <configuration>
126                             <removeAll>true</removeAll>
127                         </configuration>
128                     </execution>
129
130                     <execution>
131                         <id>generate-images</id>
132                         <phase>generate-sources</phase>
133                         <goals>
134                             <goal>build</goal>
135                         </goals>
136                     </execution>
137
138                     <execution>
139                         <id>push-images</id>
140                         <phase>deploy</phase>
141                         <goals>
142                             <goal>build</goal>
143                             <goal>push</goal>
144                         </goals>
145                     </execution>
146                 </executions>
147             </plugin>
148
149             <plugin>
150                 <groupId>org.apache.maven.plugins</groupId>
151                 <artifactId>maven-deploy-plugin</artifactId>
152                 <configuration>
153                     <skip>true</skip>
154                 </configuration>
155             </plugin>
156         </plugins>
157     </build>
158
159     <dependencies>
160         <dependency>
161             <groupId>org.onap.policy.models.sim</groupId>
162             <artifactId>models-simulator-tarball</artifactId>
163             <version>${project.version}</version>
164             <classifier>tarball</classifier>
165             <type>tar.gz</type>
166         </dependency>
167     </dependencies>
168 </project>