sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 1 | <?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> |
| 19 | <version>1.2.1</version> |
| 20 | </parent> |
| 21 | |
| 22 | <groupId>org.onap.dmaap.zookeeper</groupId> |
sunil.unnava | a04ce6f | 2019-04-15 12:49:19 -0400 | [diff] [blame] | 23 | <artifactId>zookeeper</artifactId> |
sunil.unnava | e5685d8 | 2019-05-10 11:18:36 -0400 | [diff] [blame] | 24 | <version>6.0.1-SNAPSHOT</version> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 25 | <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 | |
| 90 | <plugin> |
| 91 | <groupId>org.sonatype.plugins</groupId> |
| 92 | <artifactId>nexus-staging-maven-plugin</artifactId> |
| 93 | <extensions>false</extensions> |
| 94 | <executions> |
| 95 | <execution> |
| 96 | <id>injected-nexus-deploy</id> |
| 97 | <phase>none</phase> |
| 98 | </execution> |
| 99 | </executions> |
| 100 | </plugin> |
| 101 | <plugin> |
| 102 | <artifactId>maven-deploy-plugin</artifactId> |
| 103 | <version>2.8</version> |
| 104 | <executions> |
| 105 | <execution> |
| 106 | <id>default-deploy</id> |
| 107 | <phase>none</phase> |
| 108 | <configuration> |
| 109 | <skip /> |
| 110 | </configuration> |
| 111 | </execution> |
| 112 | </executions> |
| 113 | <configuration> |
| 114 | <skip /> |
| 115 | </configuration> |
| 116 | </plugin> |
| 117 | <plugin> |
| 118 | <groupId>com.spotify</groupId> |
| 119 | <artifactId>docker-maven-plugin</artifactId> |
| 120 | <version>1.0.0</version> |
| 121 | <configuration> |
| 122 | <imageName>onap/dmaap/zookeeper</imageName> |
| 123 | <dockerDirectory>src/main/docker</dockerDirectory> |
| 124 | <serverId>docker-hub</serverId> |
| 125 | <imageTags> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 126 | <imageTag>${dockertag1}</imageTag> |
| 127 | <imageTag>${dockertag2}</imageTag> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 128 | </imageTags> |
| 129 | <forceTags>true</forceTags> |
| 130 | <resources> |
| 131 | <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> |
| 132 | <include>${project.build.finalName}.jar</include> </resource> --> |
| 133 | <resource> |
| 134 | <targetPath>/</targetPath> |
| 135 | <directory>${project.build.directory}</directory> |
| 136 | <include>**/**</include> |
| 137 | </resource> |
| 138 | </resources> |
| 139 | </configuration> |
| 140 | <executions> |
| 141 | <execution> |
| 142 | <id>build-image</id> |
| 143 | <phase>install</phase> |
| 144 | <goals> |
| 145 | <goal>build</goal> |
| 146 | </goals> |
| 147 | <configuration> |
| 148 | <skipDockerBuild>${skip.docker.build}</skipDockerBuild> |
| 149 | </configuration> |
| 150 | </execution> |
| 151 | |
| 152 | <execution> |
| 153 | <id>tag-image-project-version</id> |
| 154 | <phase>install</phase> |
| 155 | <goals> |
| 156 | <goal>tag</goal> |
| 157 | </goals> |
| 158 | <configuration> |
| 159 | <image>onap/dmaap/zookeeper</image> |
sunil unnava | 5515b45 | 2019-02-13 18:29:13 -0500 | [diff] [blame] | 160 | <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</newName> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 161 | <skipDockerTag>${skip.docker.push}</skipDockerTag> |
| 162 | </configuration> |
| 163 | </execution> |
| 164 | |
| 165 | <execution> |
| 166 | <id>tag-image-latest</id> |
| 167 | <phase>install</phase> |
| 168 | <goals> |
| 169 | <goal>tag</goal> |
| 170 | </goals> |
| 171 | <configuration> |
| 172 | <image>onap/dmaap/zookeeper</image> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 173 | <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</newName> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 174 | <skipDockerTag>${skip.docker.push}</skipDockerTag> |
| 175 | </configuration> |
| 176 | </execution> |
| 177 | |
| 178 | <execution> |
| 179 | <id>push-image</id> |
| 180 | <phase>deploy</phase> |
| 181 | <goals> |
| 182 | <goal>push</goal> |
| 183 | </goals> |
| 184 | <configuration> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 185 | <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</imageName> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 186 | <skipDockerPush>${skip.docker.push}</skipDockerPush> |
| 187 | </configuration> |
| 188 | </execution> |
| 189 | |
| 190 | <execution> |
| 191 | <id>push-image-latest</id> |
| 192 | <phase>deploy</phase> |
| 193 | <goals> |
| 194 | <goal>push</goal> |
| 195 | </goals> |
| 196 | <configuration> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 197 | <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</imageName> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 198 | <skipDockerPush>${skip.docker.push}</skipDockerPush> |
| 199 | </configuration> |
| 200 | </execution> |
| 201 | </executions> |
| 202 | </plugin> |
| 203 | |
| 204 | </plugins> |
| 205 | </build> |
| 206 | |
| 207 | <properties> |
| 208 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 209 | <timestamp>${maven.build.timestamp}</timestamp> |
| 210 | <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 211 | <sitePath>/content/sites/site/org/onap/dmaap/zookeeper/${project.artifactId}/${project.version}</sitePath> |
| 212 | <skip.docker.build>true</skip.docker.build> |
| 213 | <skip.docker.push>true</skip.docker.push> |
| 214 | <nexusproxy>https://nexus.onap.org</nexusproxy> |
| 215 | <docker.push.registry>nexus3.onap.org:10003</docker.push.registry> |
| 216 | <onap.nexus.url>https://nexus.onap.org</onap.nexus.url> |
| 217 | </properties> |
| 218 | |
| 219 | <!-- Distribution management --> |
| 220 | <distributionManagement> |
| 221 | <site> |
| 222 | <id>ecomp-site</id> |
| 223 | <url>dav:${nexusproxy}${sitePath}</url> |
| 224 | </site> |
| 225 | </distributionManagement> |
| 226 | |
| 227 | <dependencies> |
| 228 | </dependencies> |
| 229 | |
| 230 | <profiles> |
| 231 | <profile> |
| 232 | <id>docker</id> |
| 233 | <properties> |
| 234 | <skip.docker.build>false</skip.docker.build> |
| 235 | <skip.docker.tag>false</skip.docker.tag> |
| 236 | <skip.docker.push>false</skip.docker.push> |
| 237 | </properties> |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 238 | <build> |
| 239 | <plugins> |
| 240 | <plugin> |
| 241 | <groupId>org.codehaus.groovy.maven</groupId> |
| 242 | <artifactId>gmaven-plugin</artifactId> |
| 243 | <executions> |
| 244 | <execution> |
| 245 | <phase>validate</phase> |
| 246 | <goals> |
| 247 | <goal>execute</goal> |
| 248 | </goals> |
| 249 | <configuration> |
| 250 | <properties> |
| 251 | <ver>${project.version}</ver> |
| 252 | <timestamp>${maven.build.timestamp}</timestamp> |
| 253 | </properties> |
| 254 | <source> |
| 255 | println project.properties['ver']; |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 256 | if ( project.properties['ver'].endsWith("-SNAPSHOT") ) { |
| 257 | project.properties['dockertag1']=project.properties['ver'] + "-latest"; |
| 258 | project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp']; |
| 259 | } else { |
sunil unnava | cf508ac | 2019-02-21 09:54:38 -0500 | [diff] [blame] | 260 | project.properties['dockertag1']=project.properties['ver']+ "-STAGING-latest"; |
sunil unnava | d566f9c | 2019-02-13 17:45:31 -0500 | [diff] [blame] | 261 | project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp']; |
| 262 | } |
| 263 | println 'docker tag 1: ' + project.properties['dockertag1']; |
| 264 | println 'docker tag 2: ' + project.properties['dockertag2']; |
| 265 | </source> |
| 266 | </configuration> |
| 267 | </execution> |
| 268 | </executions> |
| 269 | </plugin> |
| 270 | </plugins> |
| 271 | </build> |
sunil unnava | 5e3d91f | 2018-11-20 14:43:42 -0500 | [diff] [blame] | 272 | </profile> |
| 273 | |
| 274 | </profiles> |
| 275 | |
| 276 | </project> |