[DMaap-Buscontroller] Updated Outdated Packages
[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" 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   <groupId>org.onap.dmaap.buscontroller</groupId>
26   <artifactId>dbc-client</artifactId>
27   <version>${artifact.version}</version>
28   <name>dbc-client</name>
29   <parent>
30     <groupId>org.onap.oparent</groupId>
31     <artifactId>oparent</artifactId>
32     <version>3.2.0</version>
33     <relativePath/>
34   </parent>
35   <build>
36     <finalName>dbc-client</finalName>
37
38     <plugins>
39
40
41
42       <!-- for Distribution management -->
43       <plugin>
44         <groupId>org.apache.maven.plugins</groupId>
45         <artifactId>maven-site-plugin</artifactId>
46         <dependencies>
47           <dependency>
48             <groupId>org.apache.maven.wagon</groupId>
49             <artifactId>wagon-webdav-jackrabbit</artifactId>
50             <version>2.10</version>
51           </dependency>
52         </dependencies>
53       </plugin>
54
55     </plugins>
56     <pluginManagement>
57       <plugins>
58         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
59         <plugin>
60           <groupId>org.eclipse.m2e</groupId>
61           <artifactId>lifecycle-mapping</artifactId>
62           <version>1.0.0</version>
63           <configuration>
64             <lifecycleMappingMetadata>
65               <pluginExecutions>
66                 <pluginExecution>
67                   <pluginExecutionFilter>
68                     <groupId>org.apache.maven.plugins</groupId>
69                     <artifactId>maven-dependency-plugin</artifactId>
70                     <versionRange>[2.10,)</versionRange>
71                     <phase>install</phase>
72                     <goals>
73                       <goal>copy-dependencies</goal>
74                     </goals>
75                   </pluginExecutionFilter>
76                   <action>
77                     <ignore/>
78                   </action>
79                 </pluginExecution>
80               </pluginExecutions>
81             </lifecycleMappingMetadata>
82           </configuration>
83         </plugin>
84       </plugins>
85     </pluginManagement>
86   </build>
87   <profiles>
88       <profile>
89         <id>docker</id>
90         <properties>
91             <skipDockerBuild>false</skipDockerBuild>
92             <skipDockerTag>false</skipDockerTag>
93             <skipTests>true</skipTests>
94         </properties>
95         <build>
96             <!-- Copy files to docker-stage to be included in image -->        
97             <resources>
98                 <resource>
99                     <targetPath>${basedir}/target/docker-stage</targetPath>
100                     <directory>${basedir}/src/main/resources</directory>
101                         <includes>
102                             <include>Dockerfile</include>
103                         </includes>
104                 </resource>
105                  <resource>
106                     <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
107                     <directory>${multiproject.basedir}/certs</directory>
108                         <includes>
109                           <include>org.onap.dmaap-bc.cred.props</include>
110                           <include>org.onap.dmaap-bc.crontab.sh</include>
111                           <include>org.onap.dmaap-bc.jks</include>
112                           <include>org.onap.dmaap-bc.keyfile</include>
113                           <include>org.onap.dmaap-bc.location.props</include>
114                           <include>org.onap.dmaap-bc.p12</include>
115                           <include>org.onap.dmaap-bc.props</include>
116                           <include>org.onap.dmaap-bc.showpass</include>
117                           <include>org.onap.dmaap-bc.trust.jks</include>
118                           <include>ca.pem</include>
119                           <include>client.pem</include>
120                           <include>key.pem</include>
121                         </includes>
122                 </resource>
123
124                  <resource>
125                     <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/bin</targetPath>
126                     <directory>${basedir}/misc</directory>
127                         <includes>
128                           <include>dbc-client</include>
129                         </includes>
130                 </resource>
131                  <resource>
132                     <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/etc</targetPath>
133                     <directory>${multiproject.basedir}</directory>
134                         <includes>
135                             <include>version.properties</include>
136                         </includes>
137                 </resource>
138                  <resource>
139                     <targetPath>${basedir}/target/docker-stage/opt/app/dbc-client/misc</targetPath>
140                     <directory>${multiproject.basedir}/misc</directory>
141                         <includes>
142                             <include>cert-client-init.sh</include>
143                             <include>aaf-ca.crt</include>
144                         </includes>
145                 </resource>
146               </resources>
147             <plugins>
148
149                 <!-- Copy jar to docker-stage to be included in image -->
150                 <plugin>
151                     <artifactId>maven-resources-plugin</artifactId>
152                     <version>2.7</version>
153                     <executions>
154                        <execution>
155                             <id>copy-jar</id>
156                             <phase>package</phase>
157                             <goals>
158                                 <goal>copy-resources</goal>
159                             </goals>
160                             <configuration>
161                                 <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
162                                 <resources>
163                                     <resource>
164                                         <directory>${multiproject.basedir}/dbc-client/target</directory>
165                                         <includes>
166                                             <include>dbc-client.jar</include>
167                                         </includes>
168                                     </resource>
169                                 </resources>
170                             </configuration>
171                         </execution>
172                     </executions>
173                 </plugin>
174
175                 <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging -->
176                 <plugin>
177                   <groupId>org.codehaus.groovy.maven</groupId>
178                   <artifactId>gmaven-plugin</artifactId>
179                   <executions>
180                       <execution>
181                           <phase>validate</phase>
182                           <goals>
183                               <goal>execute</goal>
184                           </goals>
185                           <configuration>
186                               <properties>
187                                   <ver>${project.version}</ver>
188                                   <timestamp>${maven.build.timestamp}</timestamp>
189                               </properties>
190                               <source>
191                                   println 'ver: ' + project.properties['ver'];
192                                   if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
193                                       project.properties['dockertag1']=project.properties['ver'] + "-latest";
194                                       project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
195                                   } else {
196                                       project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
197                                       project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
198                                   }
199                                   println 'docker tag 1: ' + project.properties['dockertag1'];
200                                   println 'docker tag 2: ' + project.properties['dockertag2'];
201                               </source>
202                           </configuration>
203                       </execution>
204                   </executions>
205                 </plugin>
206
207                 <plugin>
208                     <groupId>io.fabric8</groupId>
209                     <artifactId>docker-maven-plugin</artifactId>
210                     <version>0.28.0</version>  
211                     <configuration>
212                         <verbose>${docker.verbose}</verbose>
213                         <apiVersion>${docker.apiVersion}</apiVersion>
214                         <pullRegistry>${docker.pull.registry}</pullRegistry>
215                         <pushRegistry>${docker.push.registry}</pushRegistry>
216                         <images>
217                             <image>                            
218                                 <name>${docker.image}</name>
219                                 <build>
220                                     <cleanup>try</cleanup>
221                                     <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
222                                     <dockerFile>Dockerfile</dockerFile>
223                                     <tags>
224                                         <tag>${dockertag1}</tag>
225                                         <tag>${dockertag2}</tag>
226                                     </tags>
227                                 </build>
228                             </image>
229                         </images>
230                     </configuration>
231                      <executions>
232                          <execution>
233                              <id>generate-images</id>
234                              <phase>install</phase>
235                              <goals>
236                                  <goal>build</goal>
237                              </goals>
238                          </execution>
239                          <execution>
240                              <id>push-images</id>
241                              <phase>deploy</phase>
242                              <goals>
243                                  <goal>push</goal>
244                              </goals>
245                          </execution>
246                      </executions>
247                 </plugin>
248             </plugins>
249         </build>
250     </profile>
251   </profiles>
252   <dependencyManagement>
253   </dependencyManagement>
254
255   <properties>
256     <multiproject.basedir>${basedir}/..</multiproject.basedir>
257     <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version>
258     <jersey.version>2.16</jersey.version>
259     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
260     <jettyVersion>9.4.12.RC2</jettyVersion>
261     <eelf.version>1.0.0</eelf.version>
262     <swagger.version>1.5.19</swagger.version>
263     <artifact.version>2.0.2-SNAPSHOT</artifact.version>
264     <!--  SONAR  -->
265     <jacoco.version>0.7.7.201606060606</jacoco.version>
266     <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
267     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
268     <!-- Default Sonar configuration -->
269     <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
270     <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
271     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
272     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
273
274     <!-- docker image -->
275     <docker.image>onap/dmaap/dbc-client</docker.image>
276
277     <nexusproxy>https://nexus.onap.org</nexusproxy>
278     <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
279
280     <!-- for Distribution Management -->
281     <sitePath>/content/sites/site/org/onap/dmaap/dbc-client/${artifact.version}</sitePath>
282
283     <timestamp>${maven.build.timestamp}</timestamp>
284     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
285
286   </properties>
287   <description>Packaging Platform (DMaaP) HTTP Client for Bus Controller Provisioning.</description>
288 </project>