DMAAP-BC - Update logback version
[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"
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>dmaap-bc</artifactId>
27   <version>${revision}</version>
28   <name>dmaap-bc</name>
29   <packaging>jar</packaging>
30   <parent>
31     <groupId>org.onap.dmaap.buscontroller</groupId>
32     <artifactId>parent</artifactId>
33     <version>${revision}</version>
34     <relativePath>../pom.xml</relativePath>
35   </parent>
36   <description>Data Movement as a Platform (DMaaP) Bus Controller provides a REST API for other
37     DCAE infrastructure components to provision DMaaP resources. A DMaaP resource is a Data
38     Router Feed or a Message Router Topic, and their associated publishers and subscribers.
39   </description>
40   <properties>
41     <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}
42     </sitePath>
43     <eelf.version>1.0.0</eelf.version>
44     <dmaapbc.image.name>${docker.image.root}${project.artifactId}</dmaapbc.image.name>
45     <swagger.version>1.5.19</swagger.version>
46     <jackson.version>2.9.5</jackson.version>
47     <jersey.version>2.29</jersey.version>
48     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
49     <jettyVersion>9.4.40.v20210413</jettyVersion>
50     <eelf.version>1.0.0</eelf.version>
51     <junit.version>4.12</junit.version>
52     <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
53     <docker-stage.target.path>/target/docker-stage/opt/app/dmaapbc/</docker-stage.target.path>
54   </properties>
55
56   <dependencyManagement>
57     <dependencies>
58       <dependency>
59         <groupId>org.glassfish.jersey</groupId>
60         <artifactId>jersey-bom</artifactId>
61         <version>${jersey.version}</version>
62         <type>pom</type>
63         <scope>import</scope>
64       </dependency>
65     </dependencies>
66   </dependencyManagement>
67
68   <dependencies>
69     <dependency>
70       <groupId>org.glassfish.jersey.media</groupId>
71       <artifactId>jersey-media-json-jackson</artifactId>
72     </dependency>
73     <dependency>
74       <groupId>org.glassfish.jersey.containers</groupId>
75       <artifactId>jersey-container-servlet-core</artifactId>
76     </dependency>
77     <dependency>
78       <groupId>org.glassfish.jersey.media</groupId>
79       <artifactId>jersey-media-moxy</artifactId>
80     </dependency>
81     <dependency>
82       <groupId>org.glassfish.jersey.test-framework.providers</groupId>
83       <!-- use this if compatibility issues with jetty artifactId:
84       <artifactId>jersey-test-framework-provider-jetty</artifactId>
85           <version>${jersey.version}</version>
86       -->
87       <artifactId>jersey-test-framework-provider-jdk-http</artifactId>
88       <version>2.29.1</version>
89     </dependency>
90     <dependency>
91       <groupId>org.glassfish.jersey.inject</groupId>
92       <artifactId>jersey-hk2</artifactId>
93       <version>2.29.1</version>
94     </dependency>
95     <dependency>
96       <groupId>org.onap.aaf.authz</groupId>
97       <artifactId>aaf-cadi-aaf</artifactId>
98       <version>2.1.7</version>
99       <classifier>full</classifier>
100       <exclusions>
101         <exclusion>
102           <artifactId>log4j</artifactId>
103           <groupId>log4j</groupId>
104         </exclusion>
105       </exclusions>
106     </dependency>
107     <dependency>
108       <groupId>com.fasterxml.jackson.core</groupId>
109       <artifactId>jackson-annotations</artifactId>
110       <version>${jackson.version}</version>
111     </dependency>
112     <dependency>
113       <groupId>com.fasterxml.jackson.dataformat</groupId>
114       <artifactId>jackson-dataformat-yaml</artifactId>
115       <version>${jackson.version}</version>
116       <exclusions>
117         <exclusion>
118           <artifactId>snakeyaml</artifactId>
119           <groupId>org.yaml</groupId>
120         </exclusion>
121       </exclusions>
122     </dependency>
123     <dependency>
124       <groupId>ch.qos.logback</groupId>
125       <artifactId>logback-core</artifactId>
126       <version>1.2.7</version>
127     </dependency>
128     <dependency>
129       <groupId>ch.qos.logback</groupId>
130       <artifactId>logback-classic</artifactId>
131       <version>1.2.3</version>
132     </dependency>
133     <!-- DMAAP-656:
134        - override this dependency because it utilized a third party
135        - lib called com.google.guava:20.0 which had severe security threat identified.
136      -->
137     <dependency>
138       <groupId>com.google.guava</groupId>
139       <artifactId>guava</artifactId>
140       <version>24.1.1-jre</version>
141     </dependency>
142     <dependency>
143       <groupId>io.swagger</groupId>
144       <artifactId>swagger-core</artifactId>
145       <version>${swagger.version}</version>
146       <exclusions>
147         <exclusion>
148             <groupId>com.fasterxml.jackson.core</groupId>
149             <artifactId>jackson-databind</artifactId>
150         </exclusion>
151       </exclusions>
152     </dependency>
153     <dependency>
154       <groupId>io.swagger</groupId>
155       <artifactId>swagger-jersey2-jaxrs</artifactId>
156       <version>${swagger.version}</version>
157       <exclusions>
158         <exclusion>
159           <artifactId>jersey-common</artifactId>
160           <groupId>org.glassfish.jersey.core</groupId>
161         </exclusion>
162       </exclusions>
163     </dependency>
164     <dependency>
165       <groupId>io.swagger</groupId>
166       <artifactId>swagger-annotations</artifactId>
167       <version>${swagger.version}</version>
168     </dependency>
169     <dependency>
170       <groupId>org.eclipse.jetty</groupId>
171       <artifactId>jetty-server</artifactId>
172       <version>${jettyVersion}</version>
173       <scope>compile</scope>
174     </dependency>
175     <dependency>
176       <groupId>org.eclipse.jetty</groupId>
177       <artifactId>jetty-servlet</artifactId>
178       <version>${jettyVersion}</version>
179       <scope>compile</scope>
180     </dependency>
181     <dependency>
182       <groupId>org.eclipse.jetty</groupId>
183       <artifactId>jetty-servlets</artifactId>
184       <version>9.4.41.v20210516</version>
185       <scope>compile</scope>
186     </dependency>
187     <dependency>
188       <groupId>org.eclipse.jetty</groupId>
189       <artifactId>jetty-http</artifactId>
190       <version>9.4.43.v20210629</version>
191       <scope>compile</scope>
192     </dependency>
193     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
194     <dependency>
195       <groupId>com.googlecode.json-simple</groupId>
196       <artifactId>json-simple</artifactId>
197       <version>1.1.1</version>
198     </dependency>
199     <dependency>
200       <groupId>commons-codec</groupId>
201       <artifactId>commons-codec</artifactId>
202       <version>1.15</version>
203     </dependency>
204     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
205     <dependency>
206       <groupId>org.postgresql</groupId>
207       <artifactId>postgresql</artifactId>
208       <version>42.2.14</version>
209     </dependency>
210     <dependency>
211       <groupId>org.slf4j</groupId>
212       <artifactId>slf4j-api</artifactId>
213       <version>1.7.22</version>
214     </dependency>
215     <dependency>
216       <!-- use 2.3.1 to avoid this issue: https://github.com/eclipse-ee4j/jaxb-ri/issues/1222 -->
217       <groupId>javax.xml.bind</groupId>
218       <artifactId>jaxb-api</artifactId>
219       <version>2.3.1</version>
220     </dependency>
221     <dependency>
222       <groupId>junit</groupId>
223       <artifactId>junit</artifactId>
224       <version>${junit.version}</version>
225       <scope>test</scope>
226     </dependency>
227     <dependency>
228       <groupId>pl.pragmatists</groupId>
229       <artifactId>JUnitParams</artifactId>
230       <version>1.1.0</version>
231       <scope>test</scope>
232     </dependency>
233     <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
234     <dependency>
235       <groupId>org.mockito</groupId>
236       <artifactId>mockito-core</artifactId>
237       <version>3.9.0</version>
238       <scope>test</scope>
239     </dependency>
240     <dependency>
241       <groupId>org.apache.maven.plugins</groupId>
242       <artifactId>maven-enforcer-plugin</artifactId>
243       <version>3.0.0-M3</version>
244       <exclusions>
245         <exclusion>
246           <artifactId>commons-io</artifactId>
247           <groupId>commons-io</groupId>
248         </exclusion>
249         <exclusion>
250           <artifactId>maven-compat</artifactId>
251           <groupId>org.apache.maven</groupId>
252         </exclusion>
253         <exclusion>
254           <artifactId>maven-settings</artifactId>
255           <groupId>org.apache.maven</groupId>
256         </exclusion>
257         <exclusion>
258           <artifactId>maven-shared-utils</artifactId>
259           <groupId>org.apache.maven.shared</groupId>
260         </exclusion>
261         <exclusion>
262           <artifactId>bsh</artifactId>
263           <groupId>org.beanshell</groupId>
264         </exclusion>
265         <exclusion>
266           <artifactId>maven-core</artifactId>
267           <groupId>org.apache.maven</groupId>
268         </exclusion>
269       </exclusions>
270     </dependency>
271     <dependency>
272       <groupId>com.att.eelf</groupId>
273       <artifactId>eelf-core</artifactId>
274       <version>${eelf.version}</version>
275       <exclusions>
276         <exclusion>
277           <groupId>org.mockito</groupId>
278           <artifactId>mockito-core</artifactId>
279         </exclusion>
280         <exclusion>
281           <groupId>org.powermock</groupId>
282           <artifactId>powermock-module-junit4</artifactId>
283         </exclusion>
284         <exclusion>
285           <groupId>org.powermock</groupId>
286           <artifactId>powermock-api-mockito</artifactId>
287         </exclusion>
288       </exclusions>
289     </dependency>
290   </dependencies>
291   <build>
292     <finalName>dmaap-bc</finalName>
293     <!-- Copy files to docker-stage to be included in image -->
294     <resources>
295       <resource>
296         <targetPath>${basedir}/target/docker-stage</targetPath>
297         <directory>${basedir}/src/main/resources/docker</directory>
298         <includes>
299           <include>Dockerfile</include>
300         </includes>
301       </resource>
302       <resource>
303         <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
304         <directory>${basedir}/src/main/resources/misc</directory>
305         <includes>
306           <include>logback.xml</include>
307           <include>LocalKey</include>
308         </includes>
309       </resource>
310       <resource>
311         <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
312         <directory>${multiproject.basedir}</directory>
313         <includes>
314           <include>version.properties</include>
315         </includes>
316       </resource>
317       <resource>
318         <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
319         <directory>${basedir}/src/main/resources/misc</directory>
320         <includes>
321           <include>*.tmpl</include>
322         </includes>
323       </resource>
324       <resource>
325         <targetPath>${basedir}${docker-stage.target.path}bin</targetPath>
326         <directory>${basedir}/src/main/resources/misc</directory>
327         <includes>
328           <include>dmaapbc</include>
329         </includes>
330       </resource>
331       <resource>
332         <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
333         <directory>${basedir}/src/main/resources/misc</directory>
334         <includes>
335           <include>schema_all.sql</include>
336         </includes>
337       </resource>
338     </resources>
339     <plugins>
340       <plugin>
341         <artifactId>maven-assembly-plugin</artifactId>
342         <version>2.4</version>
343         <configuration>
344           <descriptorRefs>
345             <descriptorRef>jar-with-dependencies</descriptorRef>
346           </descriptorRefs>
347           <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
348           <archive>
349             <manifest>
350               <addClasspath>true</addClasspath>
351               <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
352             </manifest>
353           </archive>
354           <finalName>dmaap-bc.jar</finalName>
355           <appendAssemblyId>false</appendAssemblyId>
356         </configuration>
357         <executions>
358           <execution>
359             <id>make-assembly</id>
360             <!-- this is used for inheritance merges -->
361             <phase>package</phase>
362             <!-- bind to the packaging phase -->
363             <goals>
364               <goal>single</goal>
365             </goals>
366           </execution>
367         </executions>
368       </plugin>
369       <plugin>
370         <artifactId>maven-checkstyle-plugin</artifactId>
371         <executions>
372           <execution>
373             <id>onap-java-style</id>
374             <configuration>
375               <consoleOutput>false</consoleOutput>
376             </configuration>
377           </execution>
378         </executions>
379       </plugin>
380       <!-- reference: https://tech.homeaway.com/development/2016/06/02/generating-swagger-spec.html -->
381       <plugin>
382         <groupId>com.github.kongchen</groupId>
383         <artifactId>swagger-maven-plugin</artifactId>
384         <version>3.1.5</version>
385         <configuration>
386           <apiSources>
387             <apiSource>
388               <springmvc>false</springmvc>
389               <locations>
390                 <location>org.onap.dmaap.dbcapi.resources</location>
391               </locations>
392               <schemes>
393                 <scheme>http</scheme>
394                 <scheme>https</scheme>
395               </schemes>
396               <host>www.[host]:[port]</host>
397               <basePath>/webapi</basePath>
398               <info>
399                 <title>DMaaP Bus Controller REST API</title>
400                 <version>1.1.0</version>
401                 <description>
402                   provides an API for OpenDCAE components which need to provision
403                   underlying DMaaP technologies (Data Router and Message Router).
404                   Primary clients for this API are anticipated to be the OpenDCAE
405                   Controller, OpenDCAE Orchestrator, OpenDCAE Inventory and the
406                   ECOMP Portal.
407
408                   Objects managed by DMaaP are deployed in a dcaeLocation which is
409                   a unique identifier for an OpenStack tenant for a dcaeLayer,
410                   opendcae-central (aka ecomp) or opendcae-local-ntc (aka edge).
411
412                   A dcaeEnvironment (e.g. FTL or prod) has a single DMaaP. A
413                   DMaaP is managed by a one or more stateless DMaaP Bus
414                   Controller(s), though Bus Controller relies on PGaaS for
415                   persistence. Each DMaaP has a single instance of Data Router,
416                   which has 1 or more DR_Nodes deployed at each dcaeLocation. DR
417                   Clients of type DR_Pub generally publish to a DR_Node that is
418                   local to its dcaeLocation. Routing for a Feed is determined by
419                   the dcaelocation of its DR_Sub clients.
420
421                   A DMaaP may have many Message Router instances. Each instance is
422                   deployed as an MR_Cluster. One MR_Cluster is deployed at each
423                   dcaeLocation. MR_Clients generally communicate to the
424                   MR_Cluster at the same dcaeLocation. Replication of messages
425                   between MR_Clusters is accomplished by MR Bridge, which is
426                   provioned by DMaaP Bus Controller based on Topic attributes.
427
428                   Therefore, the role of DMaaP Bus Controller is to support other
429                   DCAE infrastructure components to dynamically provision DMaaP
430                   services on behalf of DMaaP clients, and to assist in any
431                   management or discovery activity of its clients.
432
433                   A convention of this API is to return JSON responses per
434                   OpenStack style.
435                 </description>
436                 <termsOfService>
437                   http://www.apache.org/licenses/LICENSE-2.0
438                 </termsOfService>
439                 <contact>
440                   <url>http://www.onap.org</url>
441                 </contact>
442                 <license>
443                   <url>http://www.apache.org/licenses/LICENSE-2.0</url>
444                   <name>Licensed under the Apache License, Version 2.0</name>
445                 </license>
446               </info>
447               <swaggerDirectory>target/generated-sources/</swaggerDirectory>
448             </apiSource>
449           </apiSources>
450         </configuration>
451         <executions>
452           <execution>
453             <phase>compile</phase>
454             <goals>
455               <goal>generate</goal>
456             </goals>
457           </execution>
458         </executions>
459       </plugin>
460     </plugins>
461   </build>
462   <profiles>
463     <profile>
464       <id>docker</id>
465       <properties>
466         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
467         <skipTests>false</skipTests>
468       </properties>
469       <build>
470         <plugins>
471           <plugin>
472             <groupId>org.codehaus.gmaven</groupId>
473             <artifactId>gmaven-plugin</artifactId>
474           </plugin>
475           <plugin>
476             <groupId>io.fabric8</groupId>
477             <artifactId>docker-maven-plugin</artifactId>
478             <configuration>
479               <images>
480                 <image>
481                   <name>${dmaapbc.image.name}</name>
482                   <build>
483                     <cleanup>try</cleanup>
484                     <noCache>true</noCache>
485                     <optimise>true</optimise>
486                     <contextDir>${basedir}/target/docker-stage</contextDir>
487                     <dockerFile>Dockerfile</dockerFile>
488                     <tags>
489                       <tag>${dockertag1}</tag>
490                       <tag>${dockertag2}</tag>
491                     </tags>
492                   </build>
493                 </image>
494               </images>
495             </configuration>
496             <executions>
497               <execution>
498                 <id>generate-images</id>
499                 <phase>install</phase>
500                 <goals>
501                   <goal>build</goal>
502                 </goals>
503               </execution>
504               <execution>
505                 <id>push-images</id>
506                 <phase>deploy</phase>
507                 <goals>
508                   <goal>push</goal>
509                 </goals>
510               </execution>
511             </executions>
512           </plugin>
513         </plugins>
514       </build>
515     </profile>
516   </profiles>
517   <reporting>
518     <plugins>
519       <plugin>
520         <groupId>org.apache.maven.plugins</groupId>
521         <artifactId>maven-javadoc-plugin</artifactId>
522         <version>2.10.4</version>
523         <configuration>
524           <failOnError>false</failOnError>
525           <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
526           <docletArtifact>
527             <groupId>org.umlgraph</groupId>
528             <artifactId>umlgraph</artifactId>
529             <version>5.6</version>
530           </docletArtifact>
531           <additionalparam>-views</additionalparam>
532           <useStandardDocletOptions>true</useStandardDocletOptions>
533         </configuration>
534       </plugin>
535     </plugins>
536   </reporting>
537   <distributionManagement>
538     <site>
539       <id>ecomp-site</id>
540       <url>dav:${nexusproxy}${sitePath}</url>
541     </site>
542   </distributionManagement>
543 </project>