blob: db54ba01b37432864ccd22a75bae48d36166e5aa [file] [log] [blame]
sunil unnava5e3d91f2018-11-20 14:43:42 -05001<?xml version="1.0"?>
2<!-- ============LICENSE_START=======================================================
3 org.onap.dmaap ================================================================================
4 Copyright © 2018 AT&T Intellectual Property. All rights reserved. ================================================================================
5 Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 use this file except in compliance with the License. You may obtain a copy
7 of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
8 by applicable law or agreed to in writing, software distributed under the
9 License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
10 OF ANY KIND, either express or implied. See the License for the specific
11 language governing permissions and limitations under the License. ============LICENSE_END=========================================================
12 ECOMP is a trademark and service mark of AT&T Intellectual Property. -->
13<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">
14 <modelVersion>4.0.0</modelVersion>
15
16 <parent>
17 <groupId>org.onap.oparent</groupId>
18 <artifactId>oparent</artifactId>
su622bb8e2a3d2019-11-20 15:20:10 -050019 <version>2.1.0</version>
sunil unnava5e3d91f2018-11-20 14:43:42 -050020 </parent>
21
22 <groupId>org.onap.dmaap.zookeeper</groupId>
sunil.unnavaa04ce6f2019-04-15 12:49:19 -040023 <artifactId>zookeeper</artifactId>
su622b87a0a722019-08-20 13:48:58 -040024 <version>6.0.2-SNAPSHOT</version>
sunil unnava5e3d91f2018-11-20 14:43:42 -050025 <name>zookeeper</name>
26 <licenses>
27 <license>
28 <name>Apache License Version 2.0</name>
29 </license>
30 </licenses>
31
32 <developers>
33 <developer>
34 <name>Sunil Unnava</name>
35 <email/>
36 <organization>ATT</organization>
37 <organizationUrl>www.att.com</organizationUrl>
38 </developer>
39 </developers>
40
41 <build>
42 <plugins>
43 <plugin>
44 <groupId>org.apache.maven.plugins</groupId>
45 <artifactId>maven-site-plugin</artifactId>
46 <version>3.6</version>
47 <dependencies>
48 <dependency>
49 <groupId>org.apache.maven.wagon</groupId>
50 <artifactId>wagon-webdav-jackrabbit</artifactId>
51 <version>2.10</version>
52 </dependency>
53 </dependencies>
54 </plugin>
55
56 <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId>
57 <version>3.0.2</version> </plugin> -->
58
59 <plugin>
60 <groupId>org.apache.maven.plugins</groupId>
61 <artifactId>maven-source-plugin</artifactId>
62 <version>3.0.0</version>
63 <executions>
64 <execution>
65 <id>attach-sources</id>
66 <goals>
67 <goal>jar-no-fork</goal>
68 </goals>
69 </execution>
70 </executions>
71 </plugin>
72 <plugin>
73 <groupId>org.apache.maven.plugins</groupId>
74 <artifactId>maven-release-plugin</artifactId>
75 <version>2.5.3</version>
76 <configuration>
77 <autoVersionSubmodules>true</autoVersionSubmodules>
78 <checkModificationExcludes>
79 </checkModificationExcludes>
80 </configuration>
81 <dependencies>
82 <dependency>
83 <groupId>org.apache.maven.scm</groupId>
84 <artifactId>maven-scm-provider-gitexe</artifactId>
85 <version>1.9.4</version>
86 </dependency>
87 </dependencies>
88 </plugin>
89
su622ba6590cf2019-06-28 00:24:47 -040090
sunil unnava5e3d91f2018-11-20 14:43:42 -050091 <plugin>
92 <artifactId>maven-deploy-plugin</artifactId>
93 <version>2.8</version>
94 <executions>
95 <execution>
96 <id>default-deploy</id>
97 <phase>none</phase>
98 <configuration>
99 <skip />
100 </configuration>
101 </execution>
102 </executions>
103 <configuration>
104 <skip />
105 </configuration>
106 </plugin>
su622b87a0a722019-08-20 13:48:58 -0400107 <plugin>
108 <groupId>com.spotify</groupId>
109 <artifactId>docker-maven-plugin</artifactId>
110 <version>1.0.0</version>
111 <configuration>
112 <imageName>onap/dmaap/zookeeper</imageName>
113 <dockerDirectory>src/main/docker</dockerDirectory>
114 <serverId>docker-hub</serverId>
115 <imageTags>
116 <imageTag>${dockertag1}</imageTag>
117 <imageTag>${dockertag2}</imageTag>
118 </imageTags>
119 <forceTags>true</forceTags>
120 <resources>
121 <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory>
122 <include>${project.build.finalName}.jar</include> </resource> -->
123 <resource>
124 <targetPath>/</targetPath>
125 <directory>${project.build.directory}</directory>
126 <include>**/**</include>
127 </resource>
128 </resources>
129 </configuration>
130 <executions>
131 <execution>
132 <id>build-image</id>
133 <phase>install</phase>
134 <goals>
135 <goal>build</goal>
136 </goals>
137 <configuration>
138 <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
139 </configuration>
140 </execution>
141
142 <execution>
143 <id>tag-image-project-version</id>
144 <phase>install</phase>
145 <goals>
146 <goal>tag</goal>
147 </goals>
148 <configuration>
149 <image>onap/dmaap/zookeeper</image>
150 <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</newName>
151 <skipDockerTag>${skip.docker.push}</skipDockerTag>
152 </configuration>
153 </execution>
154
155 <execution>
156 <id>tag-image-latest</id>
157 <phase>install</phase>
158 <goals>
159 <goal>tag</goal>
160 </goals>
161 <configuration>
162 <image>onap/dmaap/zookeeper</image>
163 <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</newName>
164 <skipDockerTag>${skip.docker.push}</skipDockerTag>
165 </configuration>
166 </execution>
167
168 <execution>
169 <id>push-image</id>
170 <phase>deploy</phase>
171 <goals>
172 <goal>push</goal>
173 </goals>
174 <configuration>
175 <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</imageName>
176 <skipDockerPush>${skip.docker.push}</skipDockerPush>
177 </configuration>
178 </execution>
179
180 <execution>
181 <id>push-image-latest</id>
182 <phase>deploy</phase>
183 <goals>
184 <goal>push</goal>
185 </goals>
186 <configuration>
187 <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</imageName>
188 <skipDockerPush>${skip.docker.push}</skipDockerPush>
189 </configuration>
190 </execution>
191 </executions>
192 </plugin>
193
sunil unnava5e3d91f2018-11-20 14:43:42 -0500194 </plugins>
195 </build>
196
197 <properties>
198 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
sunil unnavad566f9c2019-02-13 17:45:31 -0500199 <timestamp>${maven.build.timestamp}</timestamp>
200 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
sunil unnava5e3d91f2018-11-20 14:43:42 -0500201 <sitePath>/content/sites/site/org/onap/dmaap/zookeeper/${project.artifactId}/${project.version}</sitePath>
202 <skip.docker.build>true</skip.docker.build>
203 <skip.docker.push>true</skip.docker.push>
204 <nexusproxy>https://nexus.onap.org</nexusproxy>
su622b87a0a722019-08-20 13:48:58 -0400205 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
206 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
sunil unnava5e3d91f2018-11-20 14:43:42 -0500207 </properties>
208
209 <!-- Distribution management -->
210 <distributionManagement>
211 <site>
212 <id>ecomp-site</id>
213 <url>dav:${nexusproxy}${sitePath}</url>
214 </site>
215 </distributionManagement>
216
217 <dependencies>
218 </dependencies>
219
220 <profiles>
221 <profile>
222 <id>docker</id>
223 <properties>
224 <skip.docker.build>false</skip.docker.build>
225 <skip.docker.tag>false</skip.docker.tag>
226 <skip.docker.push>false</skip.docker.push>
227 </properties>
sunil unnavad566f9c2019-02-13 17:45:31 -0500228 <build>
229 <plugins>
230 <plugin>
231 <groupId>org.codehaus.groovy.maven</groupId>
232 <artifactId>gmaven-plugin</artifactId>
233 <executions>
234 <execution>
235 <phase>validate</phase>
236 <goals>
237 <goal>execute</goal>
238 </goals>
239 <configuration>
240 <properties>
241 <ver>${project.version}</ver>
242 <timestamp>${maven.build.timestamp}</timestamp>
243 </properties>
244 <source>
245 println project.properties['ver'];
sunil unnavad566f9c2019-02-13 17:45:31 -0500246 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
247 project.properties['dockertag1']=project.properties['ver'] + "-latest";
248 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
249 } else {
su622b87a0a722019-08-20 13:48:58 -0400250 project.properties['dockertag1']=project.properties['ver']+ "-STAGING-latest";
sunil unnavad566f9c2019-02-13 17:45:31 -0500251 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
252 }
253 println 'docker tag 1: ' + project.properties['dockertag1'];
254 println 'docker tag 2: ' + project.properties['dockertag2'];
255 </source>
256 </configuration>
257 </execution>
258 </executions>
259 </plugin>
260 </plugins>
261 </build>
sunil unnava5e3d91f2018-11-20 14:43:42 -0500262 </profile>
263
264 </profiles>
265
266</project>