add guilin release notes
[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>2.1.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>log4j</groupId>
362       <artifactId>log4j</artifactId>
363       <version>1.2.17</version>
364     </dependency>
365     <dependency>
366       <groupId>org.eclipse.jetty</groupId>
367       <artifactId>jetty-server</artifactId>
368       <version>${jettyVersion}</version>
369     </dependency>
370     <dependency>
371       <groupId>org.eclipse.jetty</groupId>
372       <artifactId>jetty-util</artifactId>
373       <version>${jettyVersion}</version>
374     </dependency>
375     <dependency>
376       <groupId>org.onap.aaf.authz</groupId>
377       <artifactId>aaf-cadi-aaf</artifactId>
378       <version>2.1.7</version>
379       <classifier>full</classifier>
380     </dependency>
381
382     <dependency>
383       <groupId>org.eclipse.jetty</groupId>
384       <artifactId>jetty-servlet</artifactId>
385       <version>${jettyVersion}</version>
386       <scope>compile</scope>
387     </dependency>
388     <dependency>
389       <groupId>org.eclipse.jetty</groupId>
390       <artifactId>jetty-servlets</artifactId>
391       <version>${jettyVersion}</version>
392       <scope>compile</scope>
393     </dependency>
394     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
395     <dependency>
396       <groupId>com.googlecode.json-simple</groupId>
397       <artifactId>json-simple</artifactId>
398       <version>1.1.1</version>
399     </dependency>
400     <dependency>
401       <groupId>commons-codec</groupId>
402       <artifactId>commons-codec</artifactId>
403       <version>1.11</version>
404     </dependency>
405     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
406     <dependency>
407       <groupId>org.postgresql</groupId>
408       <artifactId>postgresql</artifactId>
409       <version>42.2.5</version>
410     </dependency>
411
412     <dependency>
413       <groupId>org.onap.dmaap.dbcapi</groupId>
414       <artifactId>dbcapi</artifactId>
415       <version>2.0.2</version>
416     </dependency>
417   </dependencies>
418   <reporting>
419     <plugins>
420       <plugin>
421         <groupId>org.apache.maven.plugins</groupId>
422         <artifactId>maven-javadoc-plugin</artifactId>
423         <version>2.10.4</version>
424         <configuration>
425           <failOnError>false</failOnError>
426           <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
427           <docletArtifact>
428             <groupId>org.umlgraph</groupId>
429             <artifactId>umlgraph</artifactId>
430             <version>5.6</version>
431           </docletArtifact>
432           <additionalparam>-views</additionalparam>
433           <useStandardDocletOptions>true</useStandardDocletOptions>
434         </configuration>
435       </plugin>
436     </plugins>
437   </reporting>
438
439   <distributionManagement>
440     <site>
441       <id>ecomp-site</id>
442       <url>dav:${nexusproxy}${sitePath}</url>
443     </site>
444   </distributionManagement>
445   <properties>
446     <multiproject.basedir>${basedir}/..</multiproject.basedir>
447     <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version>
448     <jersey.version>2.29</jersey.version>
449     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
450     <jettyVersion>9.4.24.v20191120</jettyVersion>
451     <eelf.version>1.0.0</eelf.version>
452     <swagger.version>1.5.19</swagger.version>
453     <artifact.version>2.0.4-SNAPSHOT</artifact.version>
454     <timestamp>${maven.build.timestamp}</timestamp>
455     <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
456     <!--  SONAR  -->
457     <jacoco.version>0.7.7.201606060606</jacoco.version>
458     <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
459     <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
460     <!-- Default Sonar configuration -->
461     <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
462     <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
463     <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
464     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
465
466     <!-- docker image -->
467     <docker.image>onap/dmaap/dmaap-bc</docker.image>
468
469     <nexusproxy>https://nexus.onap.org</nexusproxy>
470     <docker.push.registry>10.12.5.45:5000</docker.push.registry>
471
472     <timestamp>${maven.build.timestamp}</timestamp>
473     <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
474
475     <!-- for Distribution Management -->
476     <sitePath>/content/sites/site/org/onap/dmaap/dmaap-bc/${artifact.version}</sitePath>
477   </properties>
478   <description>Packaging Platform (DMaaP) Bus Controller API as a Docker container.</description>
479 </project>