[DMAAP-BC] Consolidate bus controller repos
[dmaap/buscontroller.git] / dbc-client / pom.xml
1 <?xml version="1.0"?>
2 <!--
3   ============LICENSE_START==========================================
4   org.onap.dmaap
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
11
12          http://www.apache.org/licenses/LICENSE-2.0
13
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.
21 -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0"
23   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
25   <modelVersion>4.0.0</modelVersion>
26   <artifactId>dbc-client</artifactId>
27   <name>dbc-client</name>
28   <packaging>jar</packaging>
29   <parent>
30     <groupId>org.onap.dmaap.buscontroller</groupId>
31     <artifactId>parent</artifactId>
32     <version>${revision}</version>
33     <relativePath>../pom.xml</relativePath>
34   </parent>
35   <description>Packaging Platform (DMaaP) HTTP Client for Bus Controller Provisioning.</description>
36   <properties>
37
38     <docker.location>${basedir}/target/${project.artifactId}</docker.location>
39     <dmaapbcclient.image.name>${docker.image.root}${project.artifactId}</dmaapbcclient.image.name>
40     <sitePath>/content/sites/site/org/onap/dmaap/dbc-client/${project.version}</sitePath>
41   </properties>
42   <build>
43     <finalName>dbc-client</finalName>
44     <plugins>
45       <plugin>
46         <artifactId>maven-resources-plugin</artifactId>
47         <version>2.7</version>
48         <executions>
49           <execution>
50             <id>copy-jar</id>
51             <phase>package</phase>
52             <goals>
53               <goal>copy-resources</goal>
54             </goals>
55             <configuration>
56               <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
57               <resources>
58                 <resource>
59                   <directory>${multiproject.basedir}/dmaap-bc/target</directory>
60                   <includes>
61                     <include>dbc-client.jar</include>
62                   </includes>
63                 </resource>
64               </resources>
65             </configuration>
66           </execution>
67         </executions>
68       </plugin>
69     </plugins>
70     <pluginManagement>
71       <plugins>
72       </plugins>
73     </pluginManagement>
74     <!-- Copy files to docker-stage to be included in image -->
75     <resources>
76       <resource>
77         <targetPath>${basedir}/target/docker-stage</targetPath>
78         <directory>${basedir}/src/main/resources</directory>
79         <includes>
80           <include>Dockerfile</include>
81         </includes>
82       </resource>
83       <resource>
84         <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
85         <directory>${basedir}/certs</directory>
86         <includes>
87           <include>ca.pem</include>
88           <include>client.pem</include>
89           <include>key.pem</include>
90         </includes>
91       </resource>
92       <resource>
93         <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/bin</targetPath>
94         <directory>${basedir}/misc</directory>
95         <includes>
96           <include>dbc-client</include>
97         </includes>
98       </resource>
99       <resource>
100         <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
101         <directory>${basedir}</directory>
102         <includes>
103           <include>version.properties</include>
104         </includes>
105       </resource>
106       <resource>
107         <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/misc</targetPath>
108         <directory>${basedir}/misc</directory>
109         <includes>
110           <include>cert-client-init.sh</include>
111           <include>aaf-ca.crt</include>
112         </includes>
113       </resource>
114     </resources>
115   </build>
116   <profiles>
117     <profile>
118       <id>docker</id>
119       <properties>
120         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
121         <skipDockerTag>${skip.docker.tag}</skipDockerTag>
122         <skipTests>true</skipTests>
123       </properties>
124       <build>
125         <plugins>
126           <plugin>
127             <groupId>io.fabric8</groupId>
128             <artifactId>docker-maven-plugin</artifactId>
129             <version>0.28.0</version>
130             <configuration>
131               <verbose>${docker.verbose}</verbose>
132               <apiVersion>${docker.apiVersion}</apiVersion>
133               <pullRegistry>${docker.pull.registry}</pullRegistry>
134               <pushRegistry>${docker.push.registry}</pushRegistry>
135               <images>
136                 <image>
137                   <name>${dmaapbcclient.image.name}</name>
138                   <build>
139                     <cleanup>try</cleanup>
140                     <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
141                     <dockerFile>Dockerfile</dockerFile>
142                     <tags>
143                       <tag>${dockertag1}</tag>
144                       <tag>${dockertag2}</tag>
145                     </tags>
146                   </build>
147                 </image>
148               </images>
149             </configuration>
150             <executions>
151               <execution>
152                 <id>generate-images</id>
153                 <phase>install</phase>
154                 <goals>
155                   <goal>build</goal>
156                 </goals>
157               </execution>
158               <execution>
159                 <id>push-images</id>
160                 <phase>deploy</phase>
161                 <goals>
162                   <goal>push</goal>
163                 </goals>
164               </execution>
165             </executions>
166           </plugin>
167         </plugins>
168       </build>
169     </profile>
170   </profiles>
171 </project>