[DMAAP-BC] Consolidate bus controller repos
[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     </dependency>
101     <dependency>
102       <groupId>com.fasterxml.jackson.core</groupId>
103       <artifactId>jackson-annotations</artifactId>
104       <version>${jackson.version}</version>
105     </dependency>
106     <dependency>
107       <groupId>com.fasterxml.jackson.dataformat</groupId>
108       <artifactId>jackson-dataformat-yaml</artifactId>
109       <version>${jackson.version}</version>
110     </dependency>
111     <dependency>
112       <groupId>ch.qos.logback</groupId>
113       <artifactId>logback-core</artifactId>
114       <version>1.2.3</version>
115     </dependency>
116     <dependency>
117       <groupId>ch.qos.logback</groupId>
118       <artifactId>logback-classic</artifactId>
119       <version>1.2.3</version>
120     </dependency>
121     <!-- DMAAP-656:
122        - override this dependency because it utilized a third party
123        - lib called com.google.guava:20.0 which had severe security threat identified.
124      -->
125     <dependency>
126       <groupId>com.google.guava</groupId>
127       <artifactId>guava</artifactId>
128       <version>24.1.1-jre</version>
129     </dependency>
130     <dependency>
131       <groupId>io.swagger</groupId>
132       <artifactId>swagger-core</artifactId>
133       <version>${swagger.version}</version>
134       <exclusions>
135         <exclusion>
136             <groupId>com.fasterxml.jackson.core</groupId>
137             <artifactId>jackson-databind</artifactId>
138         </exclusion>
139       </exclusions>
140     </dependency>
141     <dependency>
142       <groupId>io.swagger</groupId>
143       <artifactId>swagger-jersey2-jaxrs</artifactId>
144       <version>${swagger.version}</version>
145     </dependency>
146     <dependency>
147       <groupId>io.swagger</groupId>
148       <artifactId>swagger-annotations</artifactId>
149       <version>${swagger.version}</version>
150     </dependency>
151     <dependency>
152       <groupId>org.eclipse.jetty</groupId>
153       <artifactId>jetty-server</artifactId>
154       <version>${jettyVersion}</version>
155       <scope>compile</scope>
156     </dependency>
157     <dependency>
158       <groupId>org.eclipse.jetty</groupId>
159       <artifactId>jetty-servlet</artifactId>
160       <version>${jettyVersion}</version>
161       <scope>compile</scope>
162     </dependency>
163     <dependency>
164       <groupId>org.eclipse.jetty</groupId>
165       <artifactId>jetty-servlets</artifactId>
166       <version>${jettyVersion}</version>
167       <scope>compile</scope>
168     </dependency>
169     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
170     <dependency>
171       <groupId>com.googlecode.json-simple</groupId>
172       <artifactId>json-simple</artifactId>
173       <version>1.1.1</version>
174     </dependency>
175     <dependency>
176       <groupId>commons-codec</groupId>
177       <artifactId>commons-codec</artifactId>
178       <version>1.15</version>
179     </dependency>
180     <!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
181     <dependency>
182       <groupId>org.postgresql</groupId>
183       <artifactId>postgresql</artifactId>
184       <version>42.2.14</version>
185     </dependency>
186     <dependency>
187       <groupId>org.slf4j</groupId>
188       <artifactId>slf4j-api</artifactId>
189       <version>1.7.22</version>
190     </dependency>
191     <dependency>
192       <!-- use 2.3.1 to avoid this issue: https://github.com/eclipse-ee4j/jaxb-ri/issues/1222 -->
193       <groupId>javax.xml.bind</groupId>
194       <artifactId>jaxb-api</artifactId>
195       <version>2.3.1</version>
196     </dependency>
197     <dependency>
198       <groupId>junit</groupId>
199       <artifactId>junit</artifactId>
200       <version>${junit.version}</version>
201       <scope>test</scope>
202     </dependency>
203     <dependency>
204       <groupId>pl.pragmatists</groupId>
205       <artifactId>JUnitParams</artifactId>
206       <version>1.1.0</version>
207       <scope>test</scope>
208     </dependency>
209     <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
210     <dependency>
211       <groupId>org.mockito</groupId>
212       <artifactId>mockito-core</artifactId>
213       <version>3.9.0</version>
214       <scope>test</scope>
215     </dependency>
216     <dependency>
217       <groupId>org.apache.maven.plugins</groupId>
218       <artifactId>maven-enforcer-plugin</artifactId>
219       <version>3.0.0-M3</version>
220     </dependency>
221     <dependency>
222       <groupId>com.att.eelf</groupId>
223       <artifactId>eelf-core</artifactId>
224       <version>${eelf.version}</version>
225       <exclusions>
226         <exclusion>
227           <groupId>org.mockito</groupId>
228           <artifactId>mockito-core</artifactId>
229         </exclusion>
230         <exclusion>
231           <groupId>org.powermock</groupId>
232           <artifactId>powermock-module-junit4</artifactId>
233         </exclusion>
234         <exclusion>
235           <groupId>org.powermock</groupId>
236           <artifactId>powermock-api-mockito</artifactId>
237         </exclusion>
238       </exclusions>
239     </dependency>
240   </dependencies>
241   <build>
242     <finalName>dmaap-bc</finalName>
243     <!-- Copy files to docker-stage to be included in image -->
244     <resources>
245       <resource>
246         <targetPath>${basedir}/target/docker-stage</targetPath>
247         <directory>${basedir}/src/main/resources/docker</directory>
248         <includes>
249           <include>Dockerfile</include>
250         </includes>
251       </resource>
252       <resource>
253         <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
254         <directory>${basedir}/src/main/resources/misc</directory>
255         <includes>
256           <include>logback.xml</include>
257           <include>LocalKey</include>
258         </includes>
259       </resource>
260       <resource>
261         <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
262         <directory>${multiproject.basedir}</directory>
263         <includes>
264           <include>version.properties</include>
265         </includes>
266       </resource>
267       <resource>
268         <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
269         <directory>${basedir}/src/main/resources/misc</directory>
270         <includes>
271           <include>*.tmpl</include>
272         </includes>
273       </resource>
274       <resource>
275         <targetPath>${basedir}${docker-stage.target.path}bin</targetPath>
276         <directory>${basedir}/src/main/resources/misc</directory>
277         <includes>
278           <include>dmaapbc</include>
279         </includes>
280       </resource>
281       <resource>
282         <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
283         <directory>${basedir}/src/main/resources/misc</directory>
284         <includes>
285           <include>schema_all.sql</include>
286         </includes>
287       </resource>
288     </resources>
289     <plugins>
290       <plugin>
291         <artifactId>maven-assembly-plugin</artifactId>
292         <version>2.4</version>
293         <configuration>
294           <descriptorRefs>
295             <descriptorRef>jar-with-dependencies</descriptorRef>
296           </descriptorRefs>
297           <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
298           <archive>
299             <manifest>
300               <addClasspath>true</addClasspath>
301               <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
302             </manifest>
303           </archive>
304           <finalName>dmaap-bc.jar</finalName>
305           <appendAssemblyId>false</appendAssemblyId>
306         </configuration>
307         <executions>
308           <execution>
309             <id>make-assembly</id>
310             <!-- this is used for inheritance merges -->
311             <phase>package</phase>
312             <!-- bind to the packaging phase -->
313             <goals>
314               <goal>single</goal>
315             </goals>
316           </execution>
317         </executions>
318       </plugin>
319       <plugin>
320         <artifactId>maven-checkstyle-plugin</artifactId>
321         <executions>
322           <execution>
323             <id>onap-java-style</id>
324             <configuration>
325               <consoleOutput>false</consoleOutput>
326             </configuration>
327           </execution>
328         </executions>
329       </plugin>
330       <!-- reference: https://tech.homeaway.com/development/2016/06/02/generating-swagger-spec.html -->
331       <plugin>
332         <groupId>com.github.kongchen</groupId>
333         <artifactId>swagger-maven-plugin</artifactId>
334         <version>3.1.5</version>
335         <configuration>
336           <apiSources>
337             <apiSource>
338               <springmvc>false</springmvc>
339               <locations>
340                 <location>org.onap.dmaap.dbcapi.resources</location>
341               </locations>
342               <schemes>
343                 <scheme>http</scheme>
344                 <scheme>https</scheme>
345               </schemes>
346               <host>www.[host]:[port]</host>
347               <basePath>/webapi</basePath>
348               <info>
349                 <title>DMaaP Bus Controller REST API</title>
350                 <version>1.1.0</version>
351                 <description>
352                   provides an API for OpenDCAE components which need to provision
353                   underlying DMaaP technologies (Data Router and Message Router).
354                   Primary clients for this API are anticipated to be the OpenDCAE
355                   Controller, OpenDCAE Orchestrator, OpenDCAE Inventory and the
356                   ECOMP Portal.
357
358                   Objects managed by DMaaP are deployed in a dcaeLocation which is
359                   a unique identifier for an OpenStack tenant for a dcaeLayer,
360                   opendcae-central (aka ecomp) or opendcae-local-ntc (aka edge).
361
362                   A dcaeEnvironment (e.g. FTL or prod) has a single DMaaP. A
363                   DMaaP is managed by a one or more stateless DMaaP Bus
364                   Controller(s), though Bus Controller relies on PGaaS for
365                   persistence. Each DMaaP has a single instance of Data Router,
366                   which has 1 or more DR_Nodes deployed at each dcaeLocation. DR
367                   Clients of type DR_Pub generally publish to a DR_Node that is
368                   local to its dcaeLocation. Routing for a Feed is determined by
369                   the dcaelocation of its DR_Sub clients.
370
371                   A DMaaP may have many Message Router instances. Each instance is
372                   deployed as an MR_Cluster. One MR_Cluster is deployed at each
373                   dcaeLocation. MR_Clients generally communicate to the
374                   MR_Cluster at the same dcaeLocation. Replication of messages
375                   between MR_Clusters is accomplished by MR Bridge, which is
376                   provioned by DMaaP Bus Controller based on Topic attributes.
377
378                   Therefore, the role of DMaaP Bus Controller is to support other
379                   DCAE infrastructure components to dynamically provision DMaaP
380                   services on behalf of DMaaP clients, and to assist in any
381                   management or discovery activity of its clients.
382
383                   A convention of this API is to return JSON responses per
384                   OpenStack style.
385                 </description>
386                 <termsOfService>
387                   http://www.apache.org/licenses/LICENSE-2.0
388                 </termsOfService>
389                 <contact>
390                   <url>http://www.onap.org</url>
391                 </contact>
392                 <license>
393                   <url>http://www.apache.org/licenses/LICENSE-2.0</url>
394                   <name>Licensed under the Apache License, Version 2.0</name>
395                 </license>
396               </info>
397               <swaggerDirectory>target/generated-sources/</swaggerDirectory>
398             </apiSource>
399           </apiSources>
400         </configuration>
401         <executions>
402           <execution>
403             <phase>compile</phase>
404             <goals>
405               <goal>generate</goal>
406             </goals>
407           </execution>
408         </executions>
409       </plugin>
410     </plugins>
411   </build>
412   <profiles>
413     <profile>
414       <id>docker</id>
415       <properties>
416         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
417         <skipDockerTag>${skip.docker.tag}</skipDockerTag>
418         <skipTests>false</skipTests>
419       </properties>
420       <build>
421         <plugins>
422           <plugin>
423             <groupId>io.fabric8</groupId>
424             <artifactId>docker-maven-plugin</artifactId>
425             <version>0.28.0</version>
426             <configuration>
427               <verbose>${docker.verbose}</verbose>
428               <apiVersion>${docker.apiVersion}</apiVersion>
429               <pullRegistry>${docker.pull.registry}</pullRegistry>
430               <pushRegistry>${docker.push.registry}</pushRegistry>
431               <images>
432                 <image>
433                   <name>${dmaapbc.image.name}</name>
434                   <build>
435                     <cleanup>try</cleanup>
436                     <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
437                     <dockerFile>Dockerfile</dockerFile>
438                     <tags>
439                       <tag>${dockertag1}</tag>
440                       <tag>${dockertag2}</tag>
441                     </tags>
442                   </build>
443                 </image>
444               </images>
445             </configuration>
446             <executions>
447               <execution>
448                 <id>generate-images</id>
449                 <phase>install</phase>
450                 <goals>
451                   <goal>build</goal>
452                 </goals>
453               </execution>
454               <execution>
455                 <id>push-images</id>
456                 <phase>deploy</phase>
457                 <goals>
458                   <goal>push</goal>
459                 </goals>
460               </execution>
461             </executions>
462           </plugin>
463         </plugins>
464       </build>
465     </profile>
466   </profiles>
467   <reporting>
468     <plugins>
469       <plugin>
470         <groupId>org.apache.maven.plugins</groupId>
471         <artifactId>maven-javadoc-plugin</artifactId>
472         <version>2.10.4</version>
473         <configuration>
474           <failOnError>false</failOnError>
475           <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
476           <docletArtifact>
477             <groupId>org.umlgraph</groupId>
478             <artifactId>umlgraph</artifactId>
479             <version>5.6</version>
480           </docletArtifact>
481           <additionalparam>-views</additionalparam>
482           <useStandardDocletOptions>true</useStandardDocletOptions>
483         </configuration>
484       </plugin>
485     </plugins>
486   </reporting>
487   <distributionManagement>
488     <site>
489       <id>ecomp-site</id>
490       <url>dav:${nexusproxy}${sitePath}</url>
491     </site>
492   </distributionManagement>
493 </project>