Merge "Fix for Sonar critical issues"
[dmaap/messagerouter/dmaapclient.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/maven-v4_0_0.xsd">
24         <modelVersion>4.0.0</modelVersion>
25         <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
26         <artifactId>dmaapClient</artifactId>
27         <packaging>jar</packaging>
28         <version>1.0.0-SNAPSHOT</version>
29         <name>dmaap-messagerouter-dmaapclient</name>
30         <description>Client library for MR event routing API</description>
31         <url>https://github.com/att/dmaap-framework</url>
32
33         <parent>
34                 <groupId>org.onap.oparent</groupId>
35                 <artifactId>oparent</artifactId>
36                 <version>0.1.1</version>
37         </parent>
38         <properties>
39                 <!-- for the client library, we want to allow 1.6 or later -->
40                 <maven.compiler.target>1.7</maven.compiler.target>
41                 <maven.compiler.source>1.7</maven.compiler.source>
42                 <jersey.version>2.22.1</jersey.version>
43                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44                 
45                 <!--  SONAR  -->
46                  <jacoco.version>0.7.7.201606060606</jacoco.version>
47             <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
48             <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
49             <!-- Default Sonar configuration -->
50             <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
51             <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
52             <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
53             <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
54             <sitePath>/content/sites/site/org/onap/dmaap/${project.artifactId}/${project.version}</sitePath>
55         </properties>
56         
57         <distributionManagement>
58                 <site>
59                         <id>ecomp-site</id>
60                         <url>dav:${nexusproxy}${sitePath}</url>
61                 </site>
62         </distributionManagement>
63
64          <licenses>
65           <license>
66             <name>Apache License Version 2.0</name>
67           </license>
68         </licenses>
69
70         <developers>
71            <developer>
72              <name>Rajashree</name>
73              <email></email>
74              <organization>ATT</organization>
75              <organizationUrl>www.att.com</organizationUrl>
76            </developer>
77            <developer>
78              <name>Ramkumar</name>
79              <email></email>
80              <organization>ATT</organization>
81              <organizationUrl>www.att.com</organizationUrl>
82            </developer>
83          </developers>
84
85         <dependencies>
86                 <dependency>
87                         <groupId>com.att.nsa</groupId>
88                         <artifactId>saClientLibrary</artifactId>
89                         <version>0.0.1</version>
90                 </dependency>
91
92                 <dependency>
93                         <groupId>org.json</groupId>
94                         <artifactId>json</artifactId>
95                         <version>20131018</version>
96                 </dependency>
97
98                 <dependency>
99                         <groupId>com.att.aft</groupId>
100                         <artifactId>dme2</artifactId>
101                         <version>3.1.200</version>
102                         <exclusions>
103                                 <exclusion>
104                                         <groupId>com.sun.jersey</groupId>
105                                         <artifactId>jersey-json</artifactId>
106                                 </exclusion>
107                                 <exclusion>
108                                         <groupId>com.sun.jersey</groupId>
109                                         <artifactId>jersey-client</artifactId>
110                                 </exclusion>
111                         </exclusions>
112                 </dependency>
113                 <!-- Begin - Dependency on log4j for logging purpose -->
114                 <dependency>
115                         <groupId>log4j</groupId>
116                         <artifactId>log4j</artifactId>
117                         <version>1.2.17</version>
118                 </dependency>
119                 <!-- Log4j's enhanced pattern layout is shipped separately -->
120                 <dependency>
121                         <groupId>log4j</groupId>
122                         <artifactId>apache-log4j-extras</artifactId>
123                         <version>1.2.17</version>
124                 </dependency>
125                 <!-- End - Dependency on log4j for logging purpose -->
126
127                 <dependency>
128                         <groupId>javax.ws.rs</groupId>
129                         <artifactId>javax.ws.rs-api</artifactId>
130                         <version>2.0.1</version>
131                 </dependency>
132
133                 <dependency>
134                         <groupId>org.glassfish.jersey.core</groupId>
135                         <artifactId>jersey-common</artifactId>
136                         <version>${jersey.version}</version>
137                 </dependency>
138
139                 <dependency>
140                         <groupId>org.glassfish.jersey.core</groupId>
141                         <artifactId>jersey-client</artifactId>
142                         <version>${jersey.version}</version>
143                 </dependency>
144
145                 <dependency>
146                         <groupId>org.glassfish.jersey.media</groupId>
147                         <artifactId>jersey-media-json-jackson</artifactId>
148                         <version>${jersey.version}</version>
149                 </dependency>
150                 <dependency>
151                         <groupId>junit</groupId>
152                         <artifactId>junit</artifactId>
153                         <version>4.11</version>
154                         <scope>test</scope>
155                 </dependency>
156         </dependencies>
157
158         <build>
159                 <resources>
160                         <resource>
161                                 <directory>src/main/resources</directory>
162                                 <filtering>true</filtering>
163                                 <includes>
164                                         <include>**/MRClientVersion.properties</include>
165                                 </includes>
166                         </resource>
167                         <resource>
168                                 <directory>src/main/resources</directory>
169                                 <filtering>false</filtering>
170                                 <excludes>
171                                         <exclude>**/MRClientVersion.properties</exclude>
172                                 </excludes>
173                         </resource>
174                 </resources>
175                 <plugins>
176                         <plugin>
177                                 <groupId>org.apache.maven.plugins</groupId>
178                                 <artifactId>maven-site-plugin</artifactId>
179                                 <version>3.6</version>
180                                 <dependencies>
181                                         <dependency>
182                                                 <groupId>org.apache.maven.wagon</groupId>
183                                                 <artifactId>wagon-webdav-jackrabbit</artifactId>
184                                                 <version>2.10</version>
185                                         </dependency>
186                                 </dependencies>
187                         </plugin>
188                         <plugin>
189                                 <artifactId>maven-assembly-plugin</artifactId>
190                                 <version>2.4</version>
191                                 <configuration>
192                                         <descriptorRefs>
193                                                 <descriptorRef>jar-with-dependencies</descriptorRef>
194                                         </descriptorRefs>
195                                 </configuration>
196
197                                 <executions>
198                                         <execution>
199                                                 <id>make-assembly</id> <!-- this is used for inheritance merges -->
200                                                 <phase>package</phase> <!-- bind to the packaging phase -->
201                                                 <goals>
202                                                         <goal>single</goal>
203                                                 </goals>
204                                         </execution>
205                                 </executions>
206                         </plugin>
207
208
209                         <plugin>
210                                 <groupId>org.apache.maven.plugins</groupId>
211                                 <artifactId>maven-javadoc-plugin</artifactId>
212                                 <version>2.10.4</version>
213                                 <configuration>
214                                         <additionalparam>-Xdoclint:none</additionalparam>
215                                 </configuration>
216                                 <executions>
217                                         <execution>
218                                                 <id>attach-javadocs</id>
219                                                 <goals>
220                                                         <goal>jar</goal>
221                                                 </goals>
222                                         </execution>
223                                 </executions>
224                         </plugin>
225                         <plugin>
226                                 <groupId>org.apache.maven.plugins</groupId>
227                                 <artifactId>maven-source-plugin</artifactId>
228                                 <version>3.0.0</version>
229                                 <executions>
230                                         <execution>
231                                                 <id>attach-sources</id>
232                                                 <goals>
233                                                         <goal>jar-no-fork</goal>
234                                                 </goals>
235                                         </execution>
236                                 </executions>
237                         </plugin>
238                         <plugin>
239                                 <artifactId>maven-compiler-plugin</artifactId>
240                                 <version>3.1</version>
241                                 <configuration>
242                                         <source>1.7</source>
243                                         <target>1.7</target>
244                                 </configuration>
245                         </plugin>
246                 <plugin>
247           <groupId>org.jacoco</groupId>
248           <artifactId>jacoco-maven-plugin</artifactId>
249           <version>${jacoco.version}</version>
250           <configuration>
251             <!-- Note: This exclusion list should match <sonar.exclusions>
252          property above -->
253             <excludes>
254               <exclude>**/gen/**</exclude>
255               <exclude>**/generated-sources/**</exclude>
256               <exclude>**/yang-gen/**</exclude>
257               <exclude>**/pax/**</exclude>
258             </excludes>
259           </configuration>
260           <executions>
261             <!--
262         Prepares the property pointing to the JaCoCo runtime agent which
263         is passed as VM argument when Maven the Surefire plugin is executed.
264         -->
265             <execution>
266               <id>pre-unit-test</id>
267               <goals>
268                 <goal>prepare-agent</goal>
269               </goals>
270               <configuration>
271                 <!-- Sets the path to the file which contains the execution data. -->
272                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
273                 <!--
274             Sets the name of the property containing the settings
275             for JaCoCo runtime agent.
276         -->
277                 <propertyName>surefireArgLine</propertyName>
278               </configuration>
279             </execution>
280             <!--
281         Ensures that the code coverage report for unit tests is created after
282         unit tests have been run.
283         -->
284             <execution>
285               <id>post-unit-test</id>
286               <phase>test</phase>
287               <goals>
288                 <goal>report</goal>
289               </goals>
290               <configuration>
291                 <!-- Sets the path to the file which contains the execution data. -->
292                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
293                 <!-- Sets the output directory for the code coverage report. -->
294                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
295               </configuration>
296             </execution>
297             <execution>
298               <id>pre-integration-test</id>
299               <phase>pre-integration-test</phase>
300               <goals>
301                 <goal>prepare-agent</goal>
302               </goals>
303               <configuration>
304                 <!-- Sets the path to the file which contains the execution data. -->
305                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
306                 <!--
307             Sets the name of the property containing the settings
308             for JaCoCo runtime agent.
309         -->
310                 <propertyName>failsafeArgLine</propertyName>
311               </configuration>
312             </execution>
313             <!--
314         Ensures that the code coverage report for integration tests after
315         integration tests have been run.
316         -->
317             <execution>
318               <id>post-integration-test</id>
319               <phase>post-integration-test</phase>
320               <goals>
321                 <goal>report</goal>
322               </goals>
323               <configuration>
324                 <!-- Sets the path to the file which contains the execution data. -->
325                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
326                 <!-- Sets the output directory for the code coverage report. -->
327                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
328               </configuration>
329             </execution>
330           </executions>
331         </plugin>
332                 </plugins>
333         </build>
334
335         <profiles>
336                 <!-- Add plugins here that should only be executed on the Jenkins server -->
337                 <profile>
338                         <id>jenkins</id>
339                         <activation>
340                                 <property>
341                                         <name>env.BUILD_NUMBER</name>
342                                 </property>
343                         </activation>
344                         <build>
345                                 <plugins>
346                                         <plugin>
347                                                 <groupId>org.codehaus.mojo</groupId>
348                                                 <artifactId>cobertura-maven-plugin</artifactId>
349                                         </plugin>
350                                 </plugins>
351                         </build>
352                 </profile>
353         </profiles>
354 </project>