+ <build>
+ <finalName>dmaap-bc</finalName>
+ <!-- Copy files to docker-stage to be included in image -->
+ <resources>
+ <resource>
+ <targetPath>${basedir}/target/docker-stage</targetPath>
+ <directory>${basedir}/src/main/resources/docker</directory>
+ <includes>
+ <include>Dockerfile</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
+ <directory>${basedir}/src/main/resources/misc</directory>
+ <includes>
+ <include>logback.xml</include>
+ <include>LocalKey</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>${basedir}${docker-stage.target.path}etc</targetPath>
+ <directory>${multiproject.basedir}</directory>
+ <includes>
+ <include>version.properties</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
+ <directory>${basedir}/src/main/resources/misc</directory>
+ <includes>
+ <include>*.tmpl</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>${basedir}${docker-stage.target.path}bin</targetPath>
+ <directory>${basedir}/src/main/resources/misc</directory>
+ <includes>
+ <include>dmaapbc</include>
+ </includes>
+ </resource>
+ <resource>
+ <targetPath>${basedir}${docker-stage.target.path}misc</targetPath>
+ <directory>${basedir}/src/main/resources/misc</directory>
+ <includes>
+ <include>schema_all.sql</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <descriptorRefs>
+ <descriptorRef>jar-with-dependencies</descriptorRef>
+ </descriptorRefs>
+ <outputDirectory>${basedir}/target/docker-stage/opt/app/dmaapbc/lib</outputDirectory>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
+ </manifest>
+ </archive>
+ <finalName>dmaap-bc.jar</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <!-- this is used for inheritance merges -->
+ <phase>package</phase>
+ <!-- bind to the packaging phase -->
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>onap-java-style</id>
+ <configuration>
+ <consoleOutput>false</consoleOutput>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- reference: https://tech.homeaway.com/development/2016/06/02/generating-swagger-spec.html -->
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>3.1.5</version>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <springmvc>false</springmvc>
+ <locations>
+ <location>org.onap.dmaap.dbcapi.resources</location>
+ </locations>
+ <schemes>
+ <scheme>http</scheme>
+ <scheme>https</scheme>
+ </schemes>
+ <host>www.[host]:[port]</host>
+ <basePath>/webapi</basePath>
+ <info>
+ <title>DMaaP Bus Controller REST API</title>
+ <version>1.1.0</version>
+ <description>
+ provides an API for OpenDCAE components which need to provision
+ underlying DMaaP technologies (Data Router and Message Router).
+ Primary clients for this API are anticipated to be the OpenDCAE
+ Controller, OpenDCAE Orchestrator, OpenDCAE Inventory and the
+ ECOMP Portal.
+
+ Objects managed by DMaaP are deployed in a dcaeLocation which is
+ a unique identifier for an OpenStack tenant for a dcaeLayer,
+ opendcae-central (aka ecomp) or opendcae-local-ntc (aka edge).
+
+ A dcaeEnvironment (e.g. FTL or prod) has a single DMaaP. A
+ DMaaP is managed by a one or more stateless DMaaP Bus
+ Controller(s), though Bus Controller relies on PGaaS for
+ persistence. Each DMaaP has a single instance of Data Router,
+ which has 1 or more DR_Nodes deployed at each dcaeLocation. DR
+ Clients of type DR_Pub generally publish to a DR_Node that is
+ local to its dcaeLocation. Routing for a Feed is determined by
+ the dcaelocation of its DR_Sub clients.
+
+ A DMaaP may have many Message Router instances. Each instance is
+ deployed as an MR_Cluster. One MR_Cluster is deployed at each
+ dcaeLocation. MR_Clients generally communicate to the
+ MR_Cluster at the same dcaeLocation. Replication of messages
+ between MR_Clusters is accomplished by MR Bridge, which is
+ provioned by DMaaP Bus Controller based on Topic attributes.
+
+ Therefore, the role of DMaaP Bus Controller is to support other
+ DCAE infrastructure components to dynamically provision DMaaP
+ services on behalf of DMaaP clients, and to assist in any
+ management or discovery activity of its clients.
+
+ A convention of this API is to return JSON responses per
+ OpenStack style.
+ </description>
+ <termsOfService>
+ http://www.apache.org/licenses/LICENSE-2.0
+ </termsOfService>
+ <contact>
+ <url>http://www.onap.org</url>
+ </contact>
+ <license>
+ <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+ <name>Licensed under the Apache License, Version 2.0</name>
+ </license>
+ </info>
+ <swaggerDirectory>target/generated-sources/</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <properties>
+ <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
+ <skipDockerTag>${skip.docker.tag}</skipDockerTag>
+ <skipTests>false</skipTests>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.28.0</version>
+ <configuration>
+ <verbose>${docker.verbose}</verbose>
+ <apiVersion>${docker.apiVersion}</apiVersion>
+ <pullRegistry>${docker.pull.registry}</pullRegistry>
+ <pushRegistry>${docker.push.registry}</pushRegistry>
+ <images>
+ <image>
+ <name>${dmaapbc.image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <dockerFile>Dockerfile</dockerFile>
+ <tags>
+ <tag>${dockertag1}</tag>
+ <tag>${dockertag2}</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-images</id>
+ <phase>install</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>push</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>