commiting code for test coverage
[dmaap/messagerouter/msgrtr.git] / pom.xml
1 <!--
2      ============LICENSE_START=======================================================
3      org.onap.dmaap
4      ================================================================================
5      Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6      ================================================================================
7      Licensed under the Apache License, Version 2.0 (the "License");
8      you may not use this file except in compliance with the License.
9      You may obtain a copy of the License at
10            http://www.apache.org/licenses/LICENSE-2.0
11      
12      Unless required by applicable law or agreed to in writing, software
13      distributed under the License is distributed on an "AS IS" BASIS,
14      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15      See the License for the specific language governing permissions and
16      limitations under the License.
17      ============LICENSE_END=========================================================
18    
19      ECOMP is a trademark and service mark of AT&T Intellectual Property.
20      
21  -->
22 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24         <modelVersion>4.0.0</modelVersion>
25         <groupId>org.onap.dmaap.messagerouter.msgrtr</groupId>
26         <artifactId>msgrtr</artifactId>
27         <version>1.0.0-SNAPSHOT</version>
28         <packaging>jar</packaging>
29         <name>dmaap-messagerouter-msgrtr</name>
30         <description>Message Router - Restful interface built for kafka</description>
31         
32         <parent>
33                 <groupId>org.onap.oparent</groupId>
34                 <artifactId>oparent</artifactId>
35                 <version>0.1.1</version>
36         </parent>
37         
38         <properties>
39                 <spring.version>3.2.14.RELEASE</spring.version>
40                 <cxf.version>3.0.4</cxf.version>
41                 <jstl.version>1.2</jstl.version>
42                 <maven.compiler.target>1.7</maven.compiler.target>
43                 <maven.compiler.source>1.7</maven.compiler.source>
44                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
45                 
46                 <!--  SONAR  -->
47                  <jacoco.version>0.7.7.201606060606</jacoco.version>
48             <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
49             <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
50             <!-- Default Sonar configuration -->
51             <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
52             <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
53             <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
54             <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
55             <sitePath>/content/sites/site/org/onap/dmaap/messagerouter/msgrtr/${project.artifactId}/${project.version}</sitePath>
56                 <nexusproxy>https://nexus.onap.org</nexusproxy>
57         </properties>
58
59         <!-- Distribution management -->
60         <!-- Currently all artifacts will be uploaded to att-public-group reposiotry 
61                 on Maven Central -->
62         <distributionManagement>
63                 <site>
64                         <id>ecomp-site</id>
65                         <url>dav:${nexusproxy}${sitePath}</url>
66                 </site>
67         </distributionManagement>
68
69         <!-- End Distribution management -->
70
71          <licenses>
72           <license>
73             <name>Apache License Version 2.0</name>
74           </license>
75         </licenses>
76
77         <developers>
78            <developer>
79              <name>Rajashree</name>
80              <email></email>
81              <organization>ATT</organization>
82              <organizationUrl>www.att.com</organizationUrl>
83            </developer>
84            <developer>
85              <name>Ramkumar</name>
86              <email></email>
87              <organization>ATT</organization>
88              <organizationUrl>www.att.com</organizationUrl>
89            </developer>
90          </developers>
91
92         <dependencies>
93
94                 <dependency>
95                         <groupId>junit</groupId>
96                         <artifactId>junit</artifactId>
97                         <version>4.11</version>
98                         <scope>test</scope>
99                 </dependency>
100
101                 <!-- slf4j logger -->
102                 <dependency>
103                         <groupId>org.slf4j</groupId>
104                         <artifactId>slf4j-api</artifactId>
105                         <version>1.7.6</version>
106                 </dependency>
107
108                 <dependency>
109                         <groupId>javax.inject</groupId>
110                         <artifactId>javax.inject</artifactId>
111                         <version>1</version>
112                 </dependency>
113
114                 <dependency>
115                         <groupId>com.att.ajsc</groupId>
116                         <artifactId>ajsc-core</artifactId>
117                         <version>1.0.0</version>
118                 </dependency>
119
120                 <dependency>
121                         <groupId>javax.ws.rs</groupId>
122                         <artifactId>javax.ws.rs-api</artifactId>
123                         <version>2.0.1</version>
124                 </dependency>
125
126                 <!-- <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-client</artifactId> 
127                         <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> 
128                         <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version> 
129                         </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId> 
130                         <version>${cxf.version}</version> </dependency> Jetty is needed if you're 
131                         are not using the CXFServlet <dependency> <groupId>org.apache.cxf</groupId> 
132                         <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>${cxf.version}</version> 
133                         </dependency> -->
134                 <!-- Begin - Spring Dependencies for DI -->
135                 <dependency>
136                         <groupId>org.springframework</groupId>
137                         <artifactId>spring-core</artifactId>
138                         <version>${spring.version}</version>
139                 </dependency>
140                 <dependency>
141                         <groupId>org.springframework</groupId>
142                         <artifactId>spring-context</artifactId>
143                         <version>${spring.version}</version>
144                 </dependency>
145                 <dependency>
146                         <groupId>org.springframework</groupId>
147                         <artifactId>spring-webmvc</artifactId>
148                         <version>${spring.version}</version>
149                 </dependency>
150                 <dependency>
151                         <groupId>org.springframework</groupId>
152                         <artifactId>spring-web</artifactId>
153                         <version>${spring.version}</version>
154                 </dependency>
155                 <dependency>
156                         <groupId>javax.servlet</groupId>
157                         <artifactId>javax.servlet-api</artifactId>
158                         <version>3.0.1</version>
159                         <scope>provided</scope>
160                 </dependency>
161                 <!-- End - Spring Dependencies for DI -->
162                 <!-- Begin - Dependency on Dmaap Spring layer -->
163                 <!-- <dependency> <groupId>com.att.dmaap</groupId> <artifactId>dmaap-spring</artifactId> 
164                         <version>0.0.1-SNAPSHOT</version> </dependency> -->
165                 <!-- End - Dependency on Dmaap Spring layer -->
166                 <!-- Begin - Dependency on log4j for logging purpose -->
167                 <!-- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> 
168                         <version>1.2.17</version> </dependency> -->
169                 <!-- Log4j's enhanced pattern layout is shipped separately <dependency> 
170                         <groupId>log4j</groupId> <artifactId>apache-log4j-extras</artifactId> <version>1.2.17</version> 
171                         </dependency> -->
172                 <!-- End - Dependency on log4j for logging purpose -->
173                 <!-- ZooKeeper Library -->
174                 <dependency>
175                         <groupId>org.apache.zookeeper</groupId>
176                         <artifactId>zookeeper</artifactId>
177                         <version>3.4.6</version>
178                 </dependency>
179
180                 <!-- JSON libraries -->
181                 <dependency>
182                         <groupId>org.json</groupId>
183                         <artifactId>json</artifactId>
184                         <version>20131018</version>
185                 </dependency>
186
187                 <!-- Apache Kafka -->
188                 <dependency>
189                         <groupId>org.apache.kafka</groupId>
190                         <artifactId>kafka_2.10</artifactId>
191                         <version>0.8.2.1</version>
192                 </dependency>
193
194                 <dependency>
195                         <groupId>com.att.eelf</groupId>
196                         <artifactId>eelf-core</artifactId>
197                         <version>0.0.1</version>
198                         <scope>compile</scope>
199                 </dependency>
200                 <!-- our NSA server library -->
201                 <dependency>
202                         <groupId>com.att.nsa</groupId>
203                         <artifactId>nsaServerLibrary</artifactId>
204                         <version>1.0.10</version>
205                 </dependency>
206                 <dependency>
207                         <groupId>com.att.nsa</groupId>
208                         <artifactId>saToolkit</artifactId>
209                         <version>0.0.1</version>
210                 </dependency>
211
212                 <!-- our Highland Park library -->
213                  <!-- <dependency>
214                         <groupId>com.att.nsa</groupId>
215                         <artifactId>highlandParkCore</artifactId>
216                         <version>0.4.9</version>
217                 </dependency>  -->
218
219                 <!-- our base client library, for its command line tools -->
220                 <dependency>
221                         <groupId>com.att.nsa</groupId>
222                         <artifactId>saClientLibrary</artifactId>
223                         <version>0.0.1</version>
224                         <exclusions>
225                                 <exclusion>
226                                         <groupId>org.apache.httpcomponents</groupId>
227                                         <artifactId>httpclient</artifactId>
228                                 </exclusion>
229                                 <exclusion>
230                                         <groupId>org.apache.httpcomponents</groupId>
231                                         <artifactId>httpclient-cache</artifactId>
232                                 </exclusion>
233                         </exclusions>
234                 </dependency>
235                 <dependency>
236                         <groupId>org.apache.httpcomponents</groupId>
237                                         <artifactId>httpclient</artifactId>
238                                         <version>4.4.1</version>
239                 </dependency>
240                 <dependency>
241                         <groupId>org.apache.httpcomponents</groupId>
242                                         <artifactId>httpclient-cache</artifactId>
243                                         <version>4.4.1</version>
244                 </dependency>
245                 
246                 <!-- explicit jline add b/c it conflicts with the zk client -->
247                 <dependency>
248                         <groupId>jline</groupId>
249                         <artifactId>jline</artifactId>
250                         <version>2.12.1</version>
251                 </dependency>
252
253                 <dependency>
254                         <groupId>org.apache.curator</groupId>
255                         <artifactId>curator-recipes</artifactId>
256                         <version>2.6.0</version>
257                 </dependency>
258
259                 <dependency>
260                         <groupId>org.apache.curator</groupId>
261                         <artifactId>curator-test</artifactId>
262                         <version>2.6.0</version>
263                 </dependency>
264
265                 <dependency>
266                         <groupId>com.att.aft</groupId>
267                         <artifactId>dme2</artifactId>
268                         <version>3.1.200</version>
269                 </dependency>
270
271         <dependency>
272             <groupId>com.google.code.gson</groupId>
273             <artifactId>gson</artifactId>
274             <version>2.8.0</version>
275         </dependency>
276                 <dependency>
277                         <groupId>org.mockito</groupId>
278                         <artifactId>mockito-all</artifactId>
279                         <version>1.9.5</version>
280                         <scope>test</scope>
281                 </dependency>
282
283
284                 <dependency>
285                         <groupId>com.fasterxml.jackson.core</groupId>
286                         <artifactId>jackson-core</artifactId>
287                         <version>2.8.5</version>
288                         <scope>test</scope>
289                 </dependency>
290
291                 <dependency>
292                         <groupId>org.powermock</groupId>
293                         <artifactId>powermock-api-mockito</artifactId>
294                         <version>1.5.6</version>
295                         <scope>test</scope>
296                 </dependency>
297
298                 <dependency>
299                         <groupId>org.powermock</groupId>
300                         <artifactId>powermock-module-junit4</artifactId>
301                         <version>1.5.6</version>
302                         <scope>test</scope>
303                 </dependency>
304                 
305                 <dependency>
306                     <groupId>org.powermock</groupId>
307                     <artifactId>powermock-module-junit4-rule</artifactId>
308                     <version>1.5.6</version>
309                     <scope>test</scope>
310                 </dependency>
311         
312         </dependencies>
313         <build>
314                 <finalName>DMaaP</finalName>
315                 <resources>
316                         <resource>
317                                 <directory>src/main/resources</directory>
318                                 <filtering>true</filtering>
319                                 <includes>
320                                         <include>**/*.properties</include>
321                                 </includes>
322                         </resource>
323                         <!-- <resource> <directory>src/main/config</directory> <filtering>true</filtering> 
324                                 <includes> <include>**/log4j*.xml</include> </includes> </resource> <resource> 
325                                 <directory>src/main/resources</directory> <filtering>false</filtering> <excludes> 
326                                 <exclude>**/cambriaApiVersion.properties</exclude> </excludes> </resource> -->
327                 </resources>
328                 <plugins>
329                         <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4.1</version> 
330                                 <configuration> <descriptors> <descriptor>src/assembly/dep.xml</descriptor> 
331                                 </descriptors> </configuration> <executions> <execution> <id>make-assembly</id> 
332                                 this is used for inheritance merges -->
333                         <!-- <phase>package</phase> bind to the packaging phase <goals> <goal>single</goal> 
334                                 </goals> </execution> </executions> </plugin> -->
335                         <!-- -->
336                         <plugin>
337                                 <groupId>org.apache.maven.plugins</groupId>
338                                 <artifactId>maven-site-plugin</artifactId>
339                                 <version>3.6</version>
340                                 <dependencies>
341                                         <dependency>
342                                                 <groupId>org.apache.maven.wagon</groupId>
343                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
344                                                 <version>2.10</version>
345                                         </dependency>
346                                 </dependencies>
347                         </plugin>
348                         <plugin>
349                                 <groupId>org.apache.maven.plugins</groupId>
350                                 <artifactId>maven-javadoc-plugin</artifactId>
351                                 <version>2.10.4</version>
352                                 <configuration>
353                                         <additionalparam>-Xdoclint:none</additionalparam>
354                                 </configuration>
355                                 <executions>
356                                         <execution>
357                                                 <id>attach-javadocs</id>
358                                                 <goals>
359                                                         <goal>jar</goal>
360                                                 </goals>
361                                         </execution>
362                                 </executions>
363                         </plugin>
364                         <plugin>
365                                 <groupId>org.apache.maven.plugins</groupId>
366                                 <artifactId>maven-source-plugin</artifactId>
367                                 <version>3.0.0</version>
368                                 <executions>
369                                         <execution>
370                                                 <id>attach-sources</id>
371                                                 <goals>
372                                                         <goal>jar-no-fork</goal>
373                                                 </goals>
374                                         </execution>
375                                 </executions>
376                         </plugin>                       
377                         <plugin>
378                                 <groupId>org.apache.maven.plugins</groupId>
379                                 <artifactId>maven-surefire-plugin</artifactId>
380                                 <version>2.12.4</version>
381                                 <configuration>
382                                         <excludes>
383                                                 <!-- exclude until junits updated  
384                                                 <exclude>**/DME2*.java</exclude> -->
385                                         </excludes>
386                                         <!-- <skipTests>true</skipTests> -->
387                                 </configuration>
388                         </plugin>
389                                 <plugin>
390                                         <groupId>org.codehaus.mojo</groupId>
391                                         <artifactId>cobertura-maven-plugin</artifactId>
392                                         <version>2.7</version>
393                                         <configuration>
394                                             <formats>
395                                             <format>html</format>
396                                             <format>xml</format>
397                                           </formats>
398                                         </configuration>
399                            </plugin>    
400                 <!-- <plugin>
401           <groupId>org.jacoco</groupId>
402           <artifactId>jacoco-maven-plugin</artifactId>
403           <version>${jacoco.version}</version>
404           <configuration>
405             Note: This exclusion list should match <sonar.exclusions>
406          property above
407             <excludes>
408               <exclude>**/gen/**</exclude>
409               <exclude>**/generated-sources/**</exclude>
410               <exclude>**/yang-gen/**</exclude>
411               <exclude>**/pax/**</exclude>
412             </excludes>
413           </configuration>
414           <executions>
415             
416         Prepares the property pointing to the JaCoCo runtime agent which
417         is passed as VM argument when Maven the Surefire plugin is executed.
418        
419             <execution>
420               <id>pre-unit-test</id>
421               <goals>
422                 <goal>prepare-agent</goal>
423               </goals>
424               <configuration>
425                 Sets the path to the file which contains the execution data.
426                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
427                 
428             Sets the name of the property containing the settings
429             for JaCoCo runtime agent.
430        
431                 <propertyName>surefireArgLine</propertyName>
432               </configuration>
433             </execution>
434             
435         Ensures that the code coverage report for unit tests is created after
436         unit tests have been run.
437        
438             <execution>
439               <id>post-unit-test</id>
440               <phase>test</phase>
441               <goals>
442                 <goal>report</goal>
443               </goals>
444               <configuration>
445                 Sets the path to the file which contains the execution data.
446                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
447                 Sets the output directory for the code coverage report.
448                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
449               </configuration>
450             </execution>
451             <execution>
452               <id>pre-integration-test</id>
453               <phase>pre-integration-test</phase>
454               <goals>
455                 <goal>prepare-agent</goal>
456               </goals>
457               <configuration>
458                 Sets the path to the file which contains the execution data.
459                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
460                 
461             Sets the name of the property containing the settings
462             for JaCoCo runtime agent.
463        
464                 <propertyName>failsafeArgLine</propertyName>
465               </configuration>
466             </execution>
467             
468         Ensures that the code coverage report for integration tests after
469         integration tests have been run.
470        
471             <execution>
472               <id>post-integration-test</id>
473               <phase>post-integration-test</phase>
474               <goals>
475                 <goal>report</goal>
476               </goals>
477               <configuration>
478                 Sets the path to the file which contains the execution data.
479                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
480                 Sets the output directory for the code coverage report.
481                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
482               </configuration>
483             </execution>
484           </executions>
485         </plugin>               
486                  --></plugins>
487         </build>
488
489         <!-- <profiles> <profile> <id>jenkins</id> <activation> <property> <name>env.BUILD_NUMBER</name> 
490                 </property> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> 
491                 <artifactId>cobertura-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.att.aft.swm</groupId> 
492                 <artifactId>swm-plugin</artifactId> <version>1.4.4.12</version> <configuration> 
493                 <distFilesRootDirPath>/opt/app/dmaap/msgrtr/jenkinsbuild</distFilesRootDirPath> 
494                 <version>${project.version}-${env.BUILD_NUMBER}</version> <scriptExcludes> 
495                 <scriptExclude>**/swmpkgclean.sh</scriptExclude> </scriptExcludes> </configuration> 
496                 <executions> <execution> <id>pkgstage</id> <goals> <goal>pkgstage</goal> 
497                 </goals> </execution> <execution> <id>pkgcreate</id> <goals> <goal>pkgcreate</goal> 
498                 </goals> </execution> <execution> <id>pkginstall</id> <goals> <goal>install</goal> 
499                 </goals> <configuration> <componentName>com.att.nsa:msgrtr</componentName> 
500                 <version>${project.version}-${env.BUILD_NUMBER}</version> <waitTimeMins>4</waitTimeMins> 
501                 <properties> <property> <name>overrideDependencyConflicts</name> <value>true</value> 
502                 </property> <property> <name>AFTSWM_NOTIFY_ADDRESSES</name> <value>mailto:rs857c@att.com</value> 
503                 </property> </properties> </configuration> </execution> </executions> </plugin> 
504                 <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> 
505                 <phase>package</phase> <configuration> <tasks> <copy file="./src/main/scripts/swmpkgclean.sh" 
506                 toDir="./target" /> </tasks> </configuration> <goals> <goal>run</goal> </goals> 
507                 </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> 
508                 <artifactId>maven-deploy-plugin</artifactId> <version>2.5</version> <configuration> 
509                 <skip>true</skip> </configuration> </plugin> </plugins> </build> </profile> 
510                 </profiles> -->
511 </project>