[DMaap-Buscontroller] Updated Outdated Packages
[dmaap/buscontroller.git] / dmaap-bc / 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>dmaap-bc</artifactId>
27   <version>${artifact.version}</version>
28   <name>dmaap-bc</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>dmaap-bc</finalName>
37
38     <plugins>
39       <plugin>
40         <groupId>org.apache.maven.plugins</groupId>
41         <artifactId>maven-enforcer-plugin</artifactId>
42         <executions>
43           <execution>
44             <id>enforce-no-snapshots</id>
45             <goals>
46               <goal>enforce</goal>
47             </goals>
48             <configuration>
49               <rules>
50                 <requireReleaseDeps>
51                   <message>No Snapshots Allowed!</message>
52                   <excludes>
53 <!-- for example, these might be needed...
54                     <exclude>org.onap.dmaap.dbcapi:dbcapi</exclude>
55                     <exclude>org.onap.aaf.authz:aaf-cadi-client</exclude>
56                     <exclude>org.onap.aaf.authz:aaf-misc-env</exclude>
57                     <exclude>org.onap.aaf.authz:aaf-cadi-aaf</exclude>
58                     <exclude>org.onap.aaf.authz:aaf-auth-client</exclude>
59                     <exclude>org.onap.aaf.authz:aaf-cadi-core</exclude>
60                     <exclude>org.onap.aaf.authz:aaf-misc-rosetta</exclude>
61 -->
62                   </excludes>
63                 </requireReleaseDeps>
64               </rules>
65               <fail>true</fail>
66             </configuration>
67           </execution>
68         </executions>
69       </plugin>
70
71       <!-- Package an Uber jar -->
72       <plugin>
73         <groupId>org.apache.maven.plugins</groupId>
74         <artifactId>maven-shade-plugin</artifactId>
75         <version>2.4.3</version>
76         <executions>
77           <!-- Run shade goal on package phase -->
78           <execution>
79             <phase>package</phase>
80             <goals>
81               <goal>shade</goal>
82             </goals>
83             <configuration>
84               <createDependencyReducedPom>false</createDependencyReducedPom>
85               <!-- this filter section is needed to avoid runtime error:
86                 java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
87                 suggestion found at: https://stackoverflow.com/q/999489
88               -->
89               <filters>
90                 <filter>
91                   <artifact>*:*</artifact>
92                   <excludes>
93                     <exclude>META-INF/*.SF</exclude>
94                     <exclude>META-INF/*.DSA</exclude>
95                     <exclude>META-INF/*.RSA</exclude>
96                   </excludes>
97                 </filter>
98               </filters>
99               <transformers>
100                 <!-- NOTE: Need the following transformer else gets "Could not resolve type id 'https' into a subtype" error
101                 Solution found from here:
102                 http://stackoverflow.com/questions/27543060/why-does-dropwizard-configuration-is-not-working
103                 Some more context here:
104                 https://github.com/dropwizard/dropwizard/issues/455 -->
105                 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
106                 <!-- add Main-Class to manifest file -->
107                 <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
108                   <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
109                 </transformer>
110               </transformers>
111             </configuration>
112           </execution>
113         </executions>
114       </plugin>
115
116       <!-- for Distribution management -->
117       <plugin>
118         <groupId>org.apache.maven.plugins</groupId>
119         <artifactId>maven-site-plugin</artifactId>
120         <dependencies>
121           <dependency>
122             <groupId>org.apache.maven.wagon</groupId>
123             <artifactId>wagon-webdav-jackrabbit</artifactId>
124             <version>2.10</version>
125           </dependency>
126         </dependencies>
127       </plugin>
128
129     </plugins>
130     <pluginManagement>
131       <plugins>
132         <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
133         <plugin>
134           <groupId>org.eclipse.m2e</groupId>
135           <artifactId>lifecycle-mapping</artifactId>
136           <version>1.0.0</version>
137           <configuration>
138             <lifecycleMappingMetadata>
139               <pluginExecutions>
140                 <pluginExecution>
141                   <pluginExecutionFilter>
142                     <groupId>org.apache.maven.plugins</groupId>
143                     <artifactId>maven-dependency-plugin</artifactId>
144                     <versionRange>[2.10,)</versionRange>
145                     <phase>install</phase>
146                     <goals>
147                       <goal>copy-dependencies</goal>
148                     </goals>
149                   </pluginExecutionFilter>
150                   <action>
151                     <ignore/>
152                   </action>
153                 </pluginExecution>
154               </pluginExecutions>
155             </lifecycleMappingMetadata>
156           </configuration>
157         </plugin>
158       </plugins>
159     </pluginManagement>
160   </build>
161   <profiles>
162       <profile>
163         <id>docker</id>
164         <properties>
165             <skipDockerBuild>false</skipDockerBuild>
166             <skipDockerTag>false</skipDockerTag>
167             <skipTests>true</skipTests>
168         </properties>
169         <build>
170             <!-- Copy files to docker-stage to be included in image -->        
171             <resources>
172                 <resource>
173                     <targetPath>${basedir}/target/docker-stage</targetPath>
174                     <directory>${basedir}/src/main/resources</directory>
175                         <includes>
176                             <include>Dockerfile</include>
177                         </includes>
178                 </resource>
179                  <resource>
180                     <targetPath>${basedir}/target/docker-stage/opt/app/dmaapbc/misc</targetPath>
181                     <directory>${multiproject.basedir}/misc</directory>
182                         <includes>
183                             <include>cert-client-init.sh</include>
184                             <include>aaf-ca.crt</include>
185                         </includes>
186                 </resource>
187                  <resource>
188                     <targetPath>${basedir}/target/docker-stage/opt/app/dmaapbc/etc</targetPath>
189                     <directory>${basedir}/misc</directory>
190                         <includes>
191                           <include>LocalKey</include>
192                           <include>logback.xml</include>
193                         </includes>
194                 </resource>
195
196                  <resource>
197                     <targetPath>${basedir}/target/docker-stage/opt/app/dmaapbc/etc</targetPath>
198                     <directory>${multiproject.basedir}</directory>
199                         <includes>
200                             <include>version.properties</include>
201                         </includes>
202                 </resource>
203                  <resource>
204                     <targetPath>${basedir}/target/docker-stage/opt/app/dmaapbc/misc</targetPath>
205                     <directory>${basedir}/misc</directory>
206                         <includes>
207                             <include>opensource.env</include>
208                             <include>*.tmpl</include>
209                         </includes>
210                 </resource>
211                  <resource>
212                     <targetPath>${basedir}/target/docker-stage/opt/app/dmaapbc/bin</targetPath>
213                     <directory>${basedir}/misc</directory>
214                         <includes>
215                             <include>dmaapbc</include>
216                         </includes>
217                 </resource>
218               </resources>
219             <plugins>
220               <!-- Copy jar to docker-stage to be included in image -->
221               <plugin>
222                     <artifactId>maven-resources-plugin</artifactId>
223                     <version>2.7</version>
224                     <executions>
225                        <execution>
226                             <id>copy-jar</id>
227                             <phase>package</phase>
228                             <goals>
229                                 <goal>copy-resources</goal>
230                             </goals>
231                             <configuration>
232                                 <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
233                                 <resources>
234                                     <resource>
235                                         <directory>${multiproject.basedir}/dmaap-bc/target</directory>
236                                         <includes>
237                                             <include>dmaap-bc.jar</include>
238                                         </includes>
239                                     </resource>
240                                 </resources>
241                             </configuration>
242                         </execution>
243                     </executions>
244                 </plugin>
245
246                 <!-- Setup image tags per https://wiki.onap.org/display/DW/Independent+Versioning+and+Release+Process#IndependentVersioningandReleaseProcess-StandardizedDockerTagging -->
247                 <plugin>
248                   <groupId>org.codehaus.groovy.maven</groupId>
249                   <artifactId>gmaven-plugin</artifactId>
250                   <executions>
251                       <execution>
252                           <phase>validate</phase>
253                           <goals>
254                               <goal>execute</goal>
255                           </goals>
256                           <configuration>
257                               <properties>
258                                   <ver>${project.version}</ver>
259                                   <timestamp>${maven.build.timestamp}</timestamp>
260                               </properties>
261                               <source>
262                                   println 'ver: ' + project.properties['ver'];
263                                   if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
264                                       project.properties['dockertag1']=project.properties['ver'] + "-latest";
265                                       project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
266                                   } else {
267                                       project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
268                                       project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
269                                   }
270                                   println 'docker tag 1: ' + project.properties['dockertag1'];
271                                   println 'docker tag 2: ' + project.properties['dockertag2'];
272                               </source>
273                           </configuration>
274                       </execution>
275                   </executions>
276                 </plugin>
277
278                <plugin>
279                     <groupId>io.fabric8</groupId>
280                     <artifactId>docker-maven-plugin</artifactId>
281                     <version>0.28.0</version>  
282                     <configuration>
283                         <verbose>${docker.verbose}</verbose>
284                         <apiVersion>${docker.apiVersion}</apiVersion>
285                         <pullRegistry>${docker.pull.registry}</pullRegistry>
286                         <pushRegistry>${docker.push.registry}</pushRegistry>
287                         <images>
288                             <image>                            
289                                 <name>${docker.image}</name>
290                                 <build>
291                                     <cleanup>try</cleanup>
292                                     <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
293                                     <dockerFile>Dockerfile</dockerFile>
294                                     <tags>
295                                         <tag>${dockertag1}</tag>
296                                         <tag>${dockertag2}</tag>
297                                     </tags>
298                                 </build>
299                             </image>
300                         </images>
301                     </configuration>
302                      <executions>
303                          <execution>
304                              <id>generate-images</id>
305                              <phase>install</phase>
306                              <goals>
307                                  <goal>build</goal>
308                              </goals>
309                          </execution>
310                          <execution>
311                              <id>push-images</id>
312                              <phase>deploy</phase>
313                              <goals>
314                                  <goal>push</goal>
315                              </goals>
316                          </execution>
317                      </executions>
318                 </plugin>
319             </plugins>
320         </build>
321     </profile>
322   </profiles>
323   <dependencyManagement>
324     <dependencies>
325       <dependency>
326         <groupId>org.glassfish.jersey</groupId>
327         <artifactId>jersey-bom</artifactId>
328         <version>${jersey.version}</version>
329         <type>pom</type>
330         <scope>import</scope>
331       </dependency>
332     </dependencies>
333   </dependencyManagement>
334   <dependencies>
335     <dependency>
336       <groupId>io.swagger</groupId>
337       <artifactId>swagger-core</artifactId>
338       <version>${swagger.version}</version>
339     </dependency>
340     <dependency>
341       <groupId>io.swagger</groupId>
342       <artifactId>swagger-jersey2-jaxrs</artifactId>
343       <version>${swagger.version}</version>
344     </dependency>
345     <dependency>
346       <groupId>io.swagger</groupId>
347       <artifactId>swagger-annotations</artifactId>
348       <version>${swagger.version}</version>
349     </dependency>
350     <dependency>
351       <groupId>org.glassfish.jersey.containers</groupId>
352       <artifactId>jersey-container-servlet-core</artifactId>
353       <!-- use the following artifactId if you don't need servlet 2.x compatibility -->
354       <!-- artifactId>jersey-container-servlet</artifactId -->
355     </dependency>
356     <dependency>
357       <groupId>org.glassfish.jersey.media</groupId>
358       <artifactId>jersey-media-moxy</artifactId>
359     </dependency>
360     <dependency>
361       <groupId>org.apache.logging.log4j</groupId>
362       <artifactId>log4j-api</artifactId>
363       <version>${log4j.version}</version>
364     </dependency>
365     <dependency>
366       <groupId>org.apache.logging.log4j</groupId>
367       <artifactId>log4j-core</artifactId>
368       <version>${log4j.version}</version>
369     </dependency>
370     <dependency>
371       <groupId>org.eclipse.jetty</groupId>
372       <artifactId>jetty-server</artifactId>
373       <version>${jettyVersion}</version>
374     </dependency>
375     <dependency>
376       <groupId>org.eclipse.jetty</groupId>
377       <artifactId>jetty-util</artifactId>
378       <version>${jettyVersion}</version>
379     </dependency>
380     <dependency>
381       <groupId>org.onap.aaf.authz</groupId>
382       <artifactId>aaf-cadi-aaf</artifactId>
383       <version>2.1.7</version>
384       <classifier>full</classifier>
385     </dependency>
386     <dependency>
387       <groupId>org.eclipse.jetty</groupId>
388       <artifactId>jetty-servlet</artifactId>
389       <version>${jettyVersion}</version>
390       <scope>compile</scope>
391     </dependency>
392     <dependency>
393       <groupId>org.eclipse.jetty</groupId>
394       <artifactId>jetty-servlets</artifactId>
395       <version>${jettyVersion}</version>
396       <scope>compile</scope>
397     </dependency>
398     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
399     <dependency>
400       <groupId>com.googlecode.json-simple</groupId>
401       <artifactId>json-simple</artifactId>
402       <version>1.1.1</version>
403     </dependency>
404     <dependency>
405       <groupId>commons-codec</groupId>
406       <artifactId>commons-codec</artifactId>
407       <version>1.15</version>
408     </dependency>
409     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
410     <dependency>
411       <groupId>org.postgresql</groupId>
412       <artifactId>postgresql</artifactId>
413       <version>42.2.14</version>
414     </dependency>
415     <dependency>
416       <groupId>org.onap.dmaap.dbcapi</groupId>
417       <artifactId>dbcapi</artifactId>
418       <version>2.0.2</version>
419     </dependency>
420   </dependencies>
421   <reporting>
422     <plugins>
423       <plugin>
424         <groupId>org.apache.maven.plugins</groupId>
425         <artifactId>maven-javadoc-plugin</artifactId>
426         <version>2.10.4</version>
427         <configuration>
428           <failOnError>false</failOnError>
429           <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
430           <docletArtifact>
431             <groupId>org.umlgraph</groupId>
432             <artifactId>umlgraph</artifactId>
433             <version>5.6</version>
434           </docletArtifact>
435           <additionalparam>-views</additionalparam>
436           <useStandardDocletOptions>true</useStandardDocletOptions>
437         </configuration>
438       </plugin>
439     </plugins>
440   </reporting>
441
442   <distributionManagement>
443     <site>
444       <id>ecomp-site</id>
445       <url>dav:${nexusproxy}${sitePath}</url>
446     </site>
447   </distributionManagement>
448   <properties>
449     <multiproject.basedir>${basedir}/..</multiproject.basedir>
450     <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version>
451     <jersey.version>2.29</jersey.version>
452     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
453     <log4j.version>2.13.3</log4j.version>
454     <jettyVersion>9.4.36.v20210114</jettyVersion>
455     <eelf.version>1.0.0</eelf.version>
456     <swagger.version>1.5.19</swagger.version>
457     <artifact.version>2.0.4-SNAPSHOT</artifact.version>
458     <timestamp>${maven.build.timestamp}</timestamp>
459     <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
460     <!--  SONAR  -->
461     <jacoco.version>0.7.7.201606060606</jacoco.version>
462     <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
463     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
464     <!-- Default Sonar configuration -->
465     <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
466     <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
467     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
468     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
469
470     <!-- docker image -->
471     <docker.image>onap/dmaap/dmaap-bc</docker.image>
472
473     <nexusproxy>https://nexus.onap.org</nexusproxy>
474     <docker.push.registry>10.12.5.45:5000</docker.push.registry>
475
476     <timestamp>${maven.build.timestamp}</timestamp>
477     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
478
479     <!-- for Distribution Management -->
480     <sitePath>/content/sites/site/org/onap/dmaap/dmaap-bc/${artifact.version}</sitePath>
481   </properties>
482   <description>Packaging Platform (DMaaP) Bus Controller API as a Docker container.</description>
483 </project>