Files missing License text
[dmaap/buscontroller.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 82df7de..8e3f9aa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,24 +1,43 @@
 <?xml version="1.0"?>
+<!--
+  ============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>1.0.1</version>
+  <version>${artifact.version}</version>
   <name>dmaap-buscontroller</name>
   <parent>
     <groupId>org.onap.oparent</groupId>
     <artifactId>oparent</artifactId>
-    <version>0.1.1</version>
+    <version>1.1.0</version>
     <relativePath/>
   </parent>
-  <build>
+    <build>
     <finalName>buscontroller</finalName>
 
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
-        <version>3.0.0-M1</version>
         <executions>
           <execution>
             <id>enforce-no-snapshots</id>
               <fail>true</fail>
             </configuration>
           </execution>
-            </executions>
-      </plugin>
-         <plugin>
-        <!--Special goal to populate target/libs with dependencies to place in docker image -->
-           <groupId>org.apache.maven.plugins</groupId>
-           <artifactId>maven-dependency-plugin</artifactId>
-           <executions>
-             <execution>
-                   <phase>install</phase>
-                   <goals>
-                     <goal>copy-dependencies</goal>
-                   </goals>
-                   <configuration>
-                     <outputDirectory>${project.build.directory}/dependency</outputDirectory>
-                   </configuration>
-             </execution>
-       </executions>
+        </executions>
       </plugin>
 
+           <!-- Package an Uber jar -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>2.4.3</version>
+                <executions>
+                    <!-- Run shade goal on package phase -->
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                                                       <!-- 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>
+                <extensions>true</extensions>
+                <configuration>
+                    <serverId>ecomp-staging</serverId>
+                    <nexusUrl>${nexusproxy}</nexusUrl>
+                    <stagingProfileId>176c31dfe190a</stagingProfileId>
+                </configuration>
+            </plugin>
+
+
        <!-- for Distribution management -->
                <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-site-plugin</artifactId>
-                 <version>3.6</version>
                  <dependencies>
                        <dependency>
                          <groupId>org.apache.maven.wagon</groupId>
       </plugins>
     </pluginManagement>
   </build>
-  <profiles>
-   <profile>
-    <id>docker</id>
-       <build>
-        <plugins>
+       <profiles>
+       <profile>
+               <id>docker</id>
+               <build>
+                       <plugins>
       <plugin>
                <groupId>com.spotify</groupId>
                 <artifactId>docker-maven-plugin</artifactId>
                 <version>1.0.0</version>
                 <configuration>
-                                <imageName>${docker.image}</imageName>
+                                <imageName>${onap.nexus.dockerregistry.daily}/${docker.image}</imageName>
                             <dockerDirectory>${project.basedir}</dockerDirectory>
-                                <!--   <serverId>docker-hub</serverId>   -->
+                                <serverId>${onap.nexus.dockerregistry.daily}</serverId>
                                 <imageTags>
                                                 <imageTag>${artifact.version}</imageTag>
                                                 <imageTag>latest</imageTag>
                                                                        <exclude>pom.xml</exclude>
                                                                </excludes>
                                                 </resource>
-<!-- what is this?
+
                                                 <resource>
                                                                 <targetPath>/</targetPath>
                                                                 <directory>${project.build.directory}</directory>
                                                                 <include>**/**</include>
                                                 </resource>
- -->
                                 </resources>
                 </configuration>
-                <executions>
-                                <execution>
-                                                <id>build-image</id>
-                                                <phase>package</phase>
-                                                <goals>
-                                                                <goal>build</goal>
-                                                </goals>
-                                                <configuration>
-                                                                <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
-                                                </configuration>
-                                </execution>
-
-                                <execution>
-                                                <id>tag-image-project-version</id>
-                                                <phase>package</phase>
-                                                <goals>
-                                                                <goal>tag</goal>
-                                                </goals>
-                                                <configuration>
-                                                                <image>${docker.image}</image>
-                                                                <newName>${docker.push.registry}/${docker.image}:${artifact.version}</newName>
-                                                                <skipDockerTag>${skip.docker.push}</skipDockerTag>
-                                                </configuration>
-                                </execution>
-
-                                <execution>
-                                                <id>tag-image-latest</id>
-                                                <phase>package</phase>
-                                                <goals>
-                                                                <goal>tag</goal>
-                                                </goals>
-                                                <configuration>
-                                                                <image>${docker.image}</image>
-                                                                <newName>${docker.push.registry}/${docker.image}:latest</newName>
-                                                                <skipDockerTag>${skip.docker.push}</skipDockerTag>
-                                                </configuration>
-                                </execution>
-
-                                <execution>
-                                                <id>push-image-latest</id>
-                                                <phase>deploy</phase>
-                                                <goals>
-                                                                <goal>push</goal>
-                                                </goals>
-                                                <configuration>
-                                                                <imageName>${docker.push.registry}/${docker.image}:${artifact.version}</imageName>
-                                                                <skipDockerPush>${skip.docker.push}</skipDockerPush>
-                                                </configuration>
-                                </execution>
-
-                                <execution>
-                                                <id>push-image</id>
-                                                <phase>deploy</phase>
-                                                <goals>
-                                                                <goal>push</goal>
-                                                </goals>
-                                                <configuration>
-                                                                <imageName>${docker.push.registry}/${docker.image}:latest</imageName>
-                                                                <skipDockerPush>${skip.docker.push}</skipDockerPush>
-                                                </configuration>
-                                </execution>
-                </executions>
       </plugin>
-        </plugins>
-       </build>
-   </profile>
-  </profiles>
+                       </plugins>
+               </build>
+       </profile>
+       </profiles>
   <dependencyManagement>
     <dependencies>
  
        <dependency>
                <groupId>org.onap.dmaap.dbcapi</groupId>
                <artifactId>dbcapi</artifactId>
-               <version>1.0.1-SNAPSHOT</version>
+               <version>1.0.7-SNAPSHOT</version>
        </dependency>
   </dependencies>
   <reporting>
     <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.1</artifact.version>
+    <artifact.version>1.0.11</artifact.version>
                <!--  SONAR  -->
                 <jacoco.version>0.7.7.201606060606</jacoco.version>
            <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
 
        <!-- docker image -->
                 <docker.image>onap/dmaap/buscontroller</docker.image>
-                <skip.docker.build>true</skip.docker.build>
-                <skip.docker.push>true</skip.docker.push>
+
                 <nexusproxy>https://nexus.onap.org</nexusproxy>
                 <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>