Sonar Cloud migration changes
[dmaap/kafka11aaf.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 4d2563f..b322d68 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,6 @@
 <!-- ============LICENSE_START======================================================= 
        org.onap.dmaap ================================================================================ 
-       Copyright © 2017 AT&T Intellectual Property. All rights reserved. ================================================================================ 
+       Copyright Â© 2017 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 
        <parent>
                <groupId>org.onap.oparent</groupId>
                <artifactId>oparent</artifactId>
-               <version>2.0.0</version>
+               <version>2.1.0</version>
        </parent>
 
        <groupId>org.onap.dmaap.kafka</groupId>
        <artifactId>kafka11aaf</artifactId>
-       <version>1.0.2-SNAPSHOT</version>
+       <version>1.0.3-SNAPSHOT</version>
        <name>dmaap-kafka</name>
        <licenses>
                <license>
        </developers>
 
        <build>
-       <!-- Copy files to docker-stage to be included in image -->        
+               <!-- Copy files to docker-stage to be included in image -->
         <resources>
-            <resource>
-                <targetPath>${basedir}/target/docker-stage</targetPath>
-                <directory>${basedir}/src/main/docker</directory>
-                    <includes>
-                        <include>*</include>
-                    </includes>
-            </resource>
-        </resources>
+                       <resource>
+                               <targetPath>${basedir}/target/docker-stage</targetPath>
+                               <directory>${basedir}/src/main/docker</directory>
+                                       </resource>
+                        <resource>
+                               <directory>${basedir}/src/main/resources</directory>
+                       </resource>
+                
+
+               </resources> 
                <plugins>
+                   <plugin>
+                    <groupId>org.jacoco</groupId>
+                    <artifactId>jacoco-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>prepare-agent</id>
+                            <goals>
+                                <goal>prepare-agent</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>report</id>
+                            <goals>
+                                <goal>report</goal>
+                            </goals>
+                            <configuration>
+                                <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
+                                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-surefire-plugin</artifactId>
                                        <!-- <skipTests>true</skipTests> -->
                                </configuration>
                        </plugin>
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>cobertura-maven-plugin</artifactId>
-                               <version>2.7</version>
-                               <configuration>
-                                       <formats>
-                                               <format>html</format>
-                                               <format>xml</format>
-                                       </formats>
-                               </configuration>
-                       </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-site-plugin</artifactId>
                                        </execution>
                                </executions>
                        </plugin>
-
                        <plugin>
-                               <artifactId>maven-resources-plugin</artifactId>
-                                 <version>2.7</version>
-                                 <executions>
-                                    <execution>
-                                         <id>copy-jar</id>
-                                         <phase>install</phase>
-                                         <goals>
-                                             <goal>copy-resources</goal>
-                                         </goals>
-                                         <configuration>
-                                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
-                                             <resources>
-                                                 <resource>
-                                                     <directory>${basedir}/target</directory>
-                                                     <includes>
-                                                         <include>dmaapMMAgent.jar</include>
-                                                         <include>kafka11aaf-jar-with-dependencies.jar</include>
-                                                     </includes>
-                                                 </resource>
-                                             </resources>
-                                         </configuration>
-                                     </execution>
+                               <artifactId>maven-resources-plugin</artifactId>
+                                       <version>2.7</version>
+                                       <executions>
+                                               <execution>
+                                                       <id>copy-jar</id>
+                                                       <phase>install</phase>
+                                                       <goals>
+                                                               <goal>copy-resources</goal>
+                                                       </goals>
+                                                       <configuration>
+                                                               <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                                                               <resources>
+                                                                       <resource>
+                                                                               <directory>${basedir}/target</directory>
+                                                                               <includes>
+                                                                                       <include>dmaapMMAgent.jar</include>
+                                                                                       <include>kafka11aaf-jar-with-dependencies.jar</include>
+                                                                               </includes>
+                                                                       </resource>
+                                                               </resources>
+                                                       </configuration>
+                                               </execution>
                                  </executions>
-                       </plugin>
+                       </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-assembly-plugin</artifactId>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
                <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+               <sonar.language>java</sonar.language>
+        <sonar.skip>false</sonar.skip>
+        <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+        <sonar.projectVersion>${project.version}</sonar.projectVersion>
        </properties>
 
        <!-- Distribution management -->
                </dependency>
                <dependency>
                        <groupId>org.apache.kafka</groupId>
-                       <artifactId>kafka_2.12</artifactId>
-                       <version>1.1.1</version>
+                       <artifactId>kafka_2.11</artifactId>
+                       <version>2.3.0</version>
+                       <scope>provided</scope>
                </dependency>
+
                <dependency>
                        <groupId>org.powermock</groupId>
                        <artifactId>powermock-api-mockito</artifactId>
                                        </plugin>
                                        <!-- build docker image -->
                                        <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>onap/dmaap/kafka01101</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>
+                                               <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>onap/dmaap/kafka111</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>
+                                       </plugin>
                                </plugins>
                        </build>
                </profile>