3 ============LICENSE_START==========================================
5 ===================================================================
6 Copyright © 2018 AT&T Intellectual Property. All rights reserved.
7 ===================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================
20 ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
24 <modelVersion>4.0.0</modelVersion>
25 <artifactId>dbc-client</artifactId>
26 <name>dbc-client</name>
28 <groupId>org.onap.dmaap.buscontroller</groupId>
29 <artifactId>parent</artifactId>
30 <version>${revision}</version>
31 <relativePath>../pom.xml</relativePath>
33 <description>Packaging Platform (DMaaP) HTTP Client for Bus Controller Provisioning.</description>
35 <multiproject.basedir>${basedir}/..</multiproject.basedir>
36 <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version>
37 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39 <docker.image>onap/dmaap/dbc-client</docker.image>
40 <nexusproxy>https://nexus.onap.org</nexusproxy>
41 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
42 <!-- for Distribution Management -->
43 <sitePath>/content/sites/site/org/onap/dmaap/dbc-client/${revision}</sitePath>
44 <timestamp>${maven.build.timestamp}</timestamp>
45 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
48 <finalName>dbc-client</finalName>
50 <!-- for Distribution management -->
52 <groupId>org.apache.maven.plugins</groupId>
53 <artifactId>maven-site-plugin</artifactId>
56 <groupId>org.apache.maven.wagon</groupId>
57 <artifactId>wagon-webdav-jackrabbit</artifactId>
58 <version>2.10</version>
66 <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
68 <groupId>org.eclipse.m2e</groupId>
69 <artifactId>lifecycle-mapping</artifactId>
70 <version>1.0.0</version>
72 <lifecycleMappingMetadata>
75 <pluginExecutionFilter>
76 <groupId>org.apache.maven.plugins</groupId>
77 <artifactId>maven-dependency-plugin</artifactId>
78 <versionRange>[2.10,)</versionRange>
79 <phase>install</phase>
81 <goal>copy-dependencies</goal>
83 </pluginExecutionFilter>
89 </lifecycleMappingMetadata>
99 <skipDockerBuild>false</skipDockerBuild>
100 <skipDockerTag>false</skipDockerTag>
101 <skipTests>true</skipTests>
104 <!-- Copy files to docker-stage to be included in image -->
107 <targetPath>${basedir}/target/docker-stage</targetPath>
108 <directory>${basedir}/src/main/resources</directory>
110 <include>Dockerfile</include>
114 <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
115 <directory>${multiproject.basedir}/certs</directory>
117 <include>org.onap.dmaap-bc.cred.props</include>
118 <include>org.onap.dmaap-bc.crontab.sh</include>
119 <include>org.onap.dmaap-bc.jks</include>
120 <include>org.onap.dmaap-bc.keyfile</include>
121 <include>org.onap.dmaap-bc.location.props</include>
122 <include>org.onap.dmaap-bc.p12</include>
123 <include>org.onap.dmaap-bc.props</include>
124 <include>org.onap.dmaap-bc.showpass</include>
125 <include>org.onap.dmaap-bc.trust.jks</include>
126 <include>ca.pem</include>
127 <include>client.pem</include>
128 <include>key.pem</include>
133 <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/bin</targetPath>
134 <directory>${basedir}/misc</directory>
136 <include>dbc-client</include>
140 <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
141 <directory>${multiproject.basedir}</directory>
143 <include>version.properties</include>
147 <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/misc</targetPath>
148 <directory>${multiproject.basedir}/misc</directory>
150 <include>cert-client-init.sh</include>
151 <include>aaf-ca.crt</include>
157 <!-- Copy jar to docker-stage to be included in image -->
159 <artifactId>maven-resources-plugin</artifactId>
160 <version>2.7</version>
164 <phase>package</phase>
166 <goal>copy-resources</goal>
169 <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
172 <directory>${multiproject.basedir}/dbc-client/target</directory>
174 <include>dbc-client.jar</include>
183 <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging -->
185 <groupId>org.codehaus.groovy.maven</groupId>
186 <artifactId>gmaven-plugin</artifactId>
189 <phase>validate</phase>
195 <ver>${project.version}</ver>
196 <timestamp>${maven.build.timestamp}</timestamp>
199 println 'ver: ' + project.properties['ver'];
200 if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
201 project.properties['dockertag1']=project.properties['ver'] + "-latest";
202 project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
204 project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
205 project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
207 println 'docker tag 1: ' + project.properties['dockertag1'];
208 println 'docker tag 2: ' + project.properties['dockertag2'];
216 <groupId>io.fabric8</groupId>
217 <artifactId>docker-maven-plugin</artifactId>
218 <version>0.28.0</version>
220 <verbose>${docker.verbose}</verbose>
221 <apiVersion>${docker.apiVersion}</apiVersion>
222 <pullRegistry>${docker.pull.registry}</pullRegistry>
223 <pushRegistry>${docker.push.registry}</pushRegistry>
226 <name>${docker.image}</name>
228 <cleanup>try</cleanup>
229 <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
230 <dockerFile>Dockerfile</dockerFile>
232 <tag>${dockertag1}</tag>
233 <tag>${dockertag2}</tag>
241 <id>generate-images</id>
242 <phase>install</phase>
249 <phase>deploy</phase>
260 <dependencyManagement>
261 </dependencyManagement>