<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<!--
+ ============LICENSE_START==========================================
+ org.onap.dmaap
+ ===================================================================
+ Copyright © 2018 AT&T Intellectual Property. All rights reserved.
+ ===================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END============================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.dmaap.buscontroller</groupId>
<artifactId>buscontroller</artifactId>
<version>${artifact.version}</version>
- <name>buscontroller</name>
- <distributionManagement>
- <repository>
- <id>ecomp-releases</id>
- <name>Open eCOMP Release Repository</name>
- <url>${nexusproxy}/${releases.path}</url>
- </repository>
- <snapshotRepository>
- <id>ecomp-snapshots</id>
- <name>Open eCOMP Snapshot Repository</name>
- <url>${nexusproxy}/${snapshots.path}</url>
- </snapshotRepository>
- <site>
- <id>ecomp-site</id>
- <url>dav:${nexusproxy}/content/sites/site/org/onap/dmaap/dbcapi/${project.artifactId}/${project.version}/</url>
- </site>
- </distributionManagement>
- <pluginRepositories>
- <pluginRepository>
- <id>central</id>
- <url>http://repo1.maven.org/maven2</url>
- </pluginRepository>
- </pluginRepositories>
+ <name>dmaap-buscontroller</name>
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>1.2.2</version>
+ <relativePath/>
+ </parent>
<build>
<finalName>buscontroller</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
- <inherited>true</inherited>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8</version> <!-- This version supports the "deployAtEnd" parameter -->
- <configuration>
- <skip/>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.6</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav-jackrabbit</artifactId>
- <version>2.10</version>
- </dependency>
- </dependencies>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>enforce-no-snapshots</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireReleaseDeps>
+ <message>No Snapshots Allowed!</message>
+ <excludes>
+ <exclude>org.onap.dmaap.dbcapi:dbcapi</exclude>
+ <exclude>org.onap.aaf.authz:aaf-cadi-client</exclude>
+ <exclude>org.onap.aaf.authz:aaf-misc-env</exclude>
+ <exclude>org.onap.aaf.authz:aaf-cadi-aaf</exclude>
+ <exclude>org.onap.aaf.authz:aaf-auth-client</exclude>
+ <exclude>org.onap.aaf.authz:aaf-cadi-core</exclude>
+ <exclude>org.onap.aaf.authz:aaf-misc-rosetta</exclude>
+ </excludes>
+ </requireReleaseDeps>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
+
+ <!-- Package an Uber jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.10</version>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.4.3</version>
<executions>
+ <!-- Run shade goal on package phase -->
<execution>
- <id>copy-dependencies</id>
<phase>package</phase>
<goals>
- <goal>copy-dependencies</goal>
+ <goal>shade</goal>
</goals>
<configuration>
- <outputDirectory>${project.build.directory}/deps</outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>false</overWriteSnapshots>
- <overWriteIfNewer>true</overWriteIfNewer>
+ <!-- this filter section is needed to avoid runtime error:
+ java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
+ suggestion found at: https://stackoverflow.com/q/999489
+ -->
+ <filters>
+ <filter>
+ <artifact>*:*</artifact>
+ <excludes>
+ <exclude>META-INF/*.SF</exclude>
+ <exclude>META-INF/*.DSA</exclude>
+ <exclude>META-INF/*.RSA</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ <transformers>
+ <!-- NOTE: Need the following transformer else gets "Could not resolve type id 'https' into a subtype" error
+ Solution found from here:
+ http://stackoverflow.com/questions/27543060/why-does-dropwizard-configuration-is-not-working
+ Some more context here:
+ https://github.com/dropwizard/dropwizard/issues/455 -->
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+ <!-- add Main-Class to manifest file -->
+ <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+ <mainClass>org.onap.dmaap.dbcapi.server.Main</mainClass>
+ </transformer>
+ </transformers>
</configuration>
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
- <version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ecomp-staging</serverId>
</configuration>
</plugin>
+ <!-- for Distribution management -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.10</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
</plugins>
<pluginManagement>
<plugins>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.10,)</versionRange>
+ <phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</plugins>
</pluginManagement>
</build>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <baseImage>java:openjdk-8-jre</baseImage>
+ <imageName>${onap.nexus.dockerregistry.daily}/${docker.image}</imageName>
+ <entryPoint>["./bin/dmaapbc", "deploy"]</entryPoint>
+ <serverId>${onap.nexus.dockerregistry.daily}</serverId>
+ <imageTags>
+ <imageTag>${artifact.version}</imageTag>
+ <imageTag>latest</imageTag>
+ </imageTags>
+ <volumes>
+ <volume>/opt/app/dmaapbc/log</volume>
+ </volumes>
+ <forceTags>true</forceTags>
+ <user>root</user>
+ <resources>
+ <resource>
+ <targetPath>/opt/app/dmaapbc/lib</targetPath>
+ <directory>target</directory>
+ <include>buscontroller.jar</include>
+ </resource>
+ <resource>
+ <targetPath>/opt/app/dmaapbc/etc</targetPath>
+ <directory>misc</directory>
+ <include>LocalKey</include>
+ <include>logback.xml</include>
+ <include>org.onap.dmaap-bc.trust.jks</include>
+ <include>dbc-api.jks</include>
+ </resource>
+ <resource>
+ <targetPath>/opt/app/dmaapbc/etc</targetPath>
+ <directory>.</directory>
+ <include>version.properties</include>
+ </resource>
+ <resource>
+ <targetPath>/opt/app/dmaapbc/misc</targetPath>
+ <directory>misc</directory>
+ <include>opensource.env</include>
+ <include>cert-client-init.sh</include>
+ <include>*.tmpl</include>
+ </resource>
+ <resource>
+ <targetPath>/opt/app/dmaapbc/bin</targetPath>
+ <directory>misc</directory>
+ <include>dmaapbc</include>
+ <include>doaction</include>
+ </resource>
+ </resources>
+ <runs>
+ <run>mv /opt/app/dmaapbc/etc/dbc-api.jks /opt/app/dmaapbc/etc/keystore</run>
+ <run>chmod 600 /opt/app/dmaapbc/etc/keystore</run>
+ <run>chmod 600 /opt/app/dmaapbc/etc/org.onap.dmaap-bc.trust.jks</run>
+ <run>chmod +x /opt/app/dmaapbc/misc/cert-client-init.sh</run>
+ <run>chmod +x /opt/app/dmaapbc/bin/*</run>
+ <run>mkdir /opt/app/dmaapbc/logs</run>
+ <run>mkdir /opt/app/dmaapbc/www</run>
+ <run>mkdir /opt/app/dmaapbc/www/doc</run>
+ </runs>
+ <workdir>/opt/app/dmaapbc</workdir>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<dependencyManagement>
<dependencies>
-
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
</dependencies>
</dependencyManagement>
<dependencies>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-core</artifactId>
- <version>1.5.13</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jersey2-jaxrs</artifactId>
- <version>1.5.13</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>1.5.13</version>
- </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-core</artifactId>
+ <version>${swagger.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-jersey2-jaxrs</artifactId>
+ <version>${swagger.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>${swagger.version}</version>
+ </dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<artifactId>jetty-server</artifactId>
<version>${jettyVersion}</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.aaf.authz</groupId>
+ <artifactId>aaf-cadi-aaf</artifactId>
+ <version>2.1.7</version>
+ <classifier>full</classifier>
+ </dependency>
+
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>9.4.1208.jre7</version>
+ <version>42.2.5</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onap.dmaap.dbcapi</groupId>
+ <artifactId>dbcapi</artifactId>
+ <version>1.0.21-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>com.att.eelf</groupId>
- <artifactId>eelf-core</artifactId>
- <version>${eelf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.dmaap.dbcapi</groupId>
- <artifactId>dbcapi</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- </dependency>
</dependencies>
<reporting>
<plugins>
</plugin>
</plugins>
</reporting>
+
+ <distributionManagement>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:${nexusproxy}${sitePath}</url>
+ </site>
+ </distributionManagement>
<properties>
<jersey.version>2.16</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <jettyVersion>9.3.7.v20160115</jettyVersion>
- <eelf.version>0.0.1</eelf.version>
- <artifact.version>1.0.0-SNAPSHOT</artifact.version>
+ <jettyVersion>9.4.12.RC2</jettyVersion>
+ <eelf.version>1.0.0</eelf.version>
+ <swagger.version>1.5.19</swagger.version>
+ <artifact.version>1.0.26</artifact.version>
+ <!-- SONAR -->
+ <jacoco.version>0.7.7.201606060606</jacoco.version>
+ <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
+ <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
+ <!-- Default Sonar configuration -->
+ <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
+ <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
+ <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
+
+ <!-- docker image -->
+ <docker.image>onap/dmaap/buscontroller</docker.image>
+
<nexusproxy>https://nexus.onap.org</nexusproxy>
- <snapshots.path>content/repositories/snapshots/</snapshots.path>
- <releases.path>content/repositories/releases/</releases.path>
+ <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+
+ <!-- for Distribution Management -->
+ <sitePath>/content/sites/site/org/onap/dmaap/buscontroller/${artifact.version}</sitePath>
</properties>
- <description>Packaging Platform (DMaaP) Bus Controller API as a Docker container. </description>
+ <description>Packaging Platform (DMaaP) Bus Controller API as a Docker container.</description>
</project>