Improve code coverage for aaf cadi modules
[aaf/cadi.git] / client / pom.xml
1 <!--\r
2   ============LICENSE_START====================================================\r
3   * org.onap.aaf\r
4   * ===========================================================================\r
5   * Copyright © 2017 AT&T Intellectual Property. All rights reserved.\r
6   * ===========================================================================\r
7   * Licensed under the Apache License, Version 2.0 (the "License");\r
8   * you may not use this file except in compliance with the License.\r
9   * You may obtain a copy of the License at\r
10   * \r
11    *      http://www.apache.org/licenses/LICENSE-2.0\r
12   * \r
13    * Unless required by applicable law or agreed to in writing, software\r
14   * distributed under the License is distributed on an "AS IS" BASIS,\r
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16   * See the License for the specific language governing permissions and\r
17   * limitations under the License.\r
18   * ============LICENSE_END====================================================\r
19   *\r
20   * ECOMP is a trademark and service mark of AT&T Intellectual Property.\r
21   *\r
22 -->\r
23 <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/xsd/maven-4.0.0.xsd">\r
24 <parent>\r
25                 <groupId>org.onap.aaf.cadi</groupId>\r
26                 <artifactId>parent</artifactId>\r
27                 <version>1.0.0-SNAPSHOT</version>\r
28                 <relativePath>..</relativePath>\r
29         </parent>\r
30         \r
31         <name>CADI Client</name>\r
32         <artifactId>cadi-client</artifactId>\r
33         <packaging>jar</packaging>\r
34         <url>https://github.com/att/AAF</url>\r
35         <description>CADI</description>\r
36         <modelVersion>4.0.0</modelVersion>\r
37 <properties>\r
38                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
39                 <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>\r
40                 <sonar.language>java</sonar.language>\r
41                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>\r
42                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>\r
43                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>\r
44                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>\r
45                 <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>\r
46                 <sonar.projectVersion>${project.version}</sonar.projectVersion>\r
47         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
48                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
49                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
50                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
51                 <sitePath>/content/sites/site/org/onap/aaf/cadi/${project.artifactId}/${project.version}</sitePath>\r
52         </properties>\r
53         <dependencies>\r
54                 <dependency>\r
55                         <groupId>org.onap.aaf.inno</groupId>\r
56                         <artifactId>rosetta</artifactId>\r
57                 </dependency>\r
58                 <dependency>\r
59                         <groupId>org.onap.aaf.cadi</groupId>\r
60                         <artifactId>cadi-core</artifactId>\r
61                 </dependency>\r
62                 <dependency>\r
63                         <groupId>com.att.aft</groupId>\r
64                         <artifactId>dme2</artifactId>\r
65                         <scope>compile</scope>\r
66                 </dependency>\r
67                 <dependency>\r
68                         <groupId>org.mockito</groupId>\r
69                         <artifactId>mockito-all</artifactId>\r
70                         <version>1.9.5</version>\r
71                         <scope>test</scope>\r
72                         </dependency>\r
73         </dependencies>\r
74 \r
75         <build>\r
76                 <plugins>\r
77                         <plugin>\r
78                                 <groupId>org.apache.maven.plugins</groupId>\r
79                                 <artifactId>maven-jarsigner-plugin</artifactId>\r
80                         </plugin>\r
81                         <plugin>\r
82                         <groupId>org.apache.maven.plugins</groupId>\r
83                         <artifactId>maven-javadoc-plugin</artifactId>\r
84                         <version>2.10.4</version>\r
85                         <configuration>\r
86                         <failOnError>false</failOnError>\r
87                         </configuration>\r
88                         <executions>\r
89                                 <execution>\r
90                                         <id>attach-javadocs</id>\r
91                                         <goals>\r
92                                                 <goal>jar</goal>\r
93                                         </goals>\r
94                                 </execution>\r
95                         </executions>\r
96                 </plugin> \r
97            \r
98            \r
99                <plugin>\r
100                       <groupId>org.apache.maven.plugins</groupId>\r
101                       <artifactId>maven-source-plugin</artifactId>\r
102                       <version>2.2.1</version>\r
103                       <executions>\r
104                         <execution>\r
105                           <id>attach-sources</id>\r
106                           <goals>\r
107                             <goal>jar-no-fork</goal>\r
108                           </goals>\r
109                         </execution>\r
110                       </executions>\r
111                     </plugin>\r
112         \r
113   <plugin>\r
114                                 <groupId>org.sonatype.plugins</groupId>\r
115                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
116                                 <version>1.6.7</version>\r
117                                 <extensions>true</extensions>\r
118                                 <configuration>\r
119                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
120                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
121                                         <serverId>ecomp-staging</serverId>\r
122                                 </configuration>\r
123                         </plugin>\r
124 \r
125 <plugin>\r
126           <groupId>org.jacoco</groupId>\r
127           <artifactId>jacoco-maven-plugin</artifactId>\r
128           <version>${jacoco.version}</version>\r
129           <configuration>\r
130             <!-- Note: This exclusion list should match <sonar.exclusions>\r
131          property above -->\r
132             <excludes>\r
133               <exclude>**/gen/**</exclude>\r
134               <exclude>**/generated-sources/**</exclude>\r
135               <exclude>**/yang-gen/**</exclude>\r
136               <exclude>**/pax/**</exclude>\r
137             </excludes>\r
138           </configuration>\r
139           <executions>\r
140             <!--\r
141         Prepares the property pointing to the JaCoCo runtime agent which\r
142         is passed as VM argument when Maven the Surefire plugin is executed.\r
143         -->\r
144             <execution>\r
145               <id>pre-unit-test</id>\r
146               <goals>\r
147                 <goal>prepare-agent</goal>\r
148               </goals>\r
149               <configuration>\r
150                 <!-- Sets the path to the file which contains the execution data. -->\r
151                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
152                 <!--\r
153             Sets the name of the property containing the settings\r
154             for JaCoCo runtime agent.\r
155         -->\r
156                 <propertyName>surefireArgLine</propertyName>\r
157               </configuration>\r
158             </execution>\r
159             <!--\r
160         Ensures that the code coverage report for unit tests is created after\r
161         unit tests have been run.\r
162         -->\r
163             <execution>\r
164               <id>post-unit-test</id>\r
165               <phase>test</phase>\r
166               <goals>\r
167                 <goal>report</goal>\r
168               </goals>\r
169               <configuration>\r
170                 <!-- Sets the path to the file which contains the execution data. -->\r
171                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
172                 <!-- Sets the output directory for the code coverage report. -->\r
173                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
174               </configuration>\r
175             </execution>\r
176             <execution>\r
177               <id>pre-integration-test</id>\r
178               <phase>pre-integration-test</phase>\r
179               <goals>\r
180                 <goal>prepare-agent</goal>\r
181               </goals>\r
182               <configuration>\r
183                 <!-- Sets the path to the file which contains the execution data. -->\r
184                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
185                 <!--\r
186             Sets the name of the property containing the settings\r
187             for JaCoCo runtime agent.\r
188         -->\r
189                 <propertyName>failsafeArgLine</propertyName>\r
190               </configuration>\r
191             </execution>\r
192             <!--\r
193         Ensures that the code coverage report for integration tests after\r
194         integration tests have been run.\r
195         -->\r
196             <execution>\r
197               <id>post-integration-test</id>\r
198               <phase>post-integration-test</phase>\r
199               <goals>\r
200                 <goal>report</goal>\r
201               </goals>\r
202               <configuration>\r
203                 <!-- Sets the path to the file which contains the execution data. -->\r
204                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
205                 <!-- Sets the output directory for the code coverage report. -->\r
206                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
207               </configuration>\r
208             </execution>\r
209           </executions>\r
210         </plugin>                    \r
211 \r
212                 </plugins>\r
213         </build>\r
214                 <distributionManagement>\r
215                 <repository>\r
216                         <id>ecomp-releases</id>\r
217                         <name>AAF Release Repository</name>\r
218                         <url>${nexusproxy}${releaseNexusPath}</url>\r
219                 </repository>\r
220                 <snapshotRepository>\r
221                         <id>ecomp-snapshots</id>\r
222                         <name>AAF Snapshot Repository</name>\r
223                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
224                 </snapshotRepository>\r
225                 <site>\r
226                         <id>ecomp-site</id>\r
227                         <url>dav:${nexusproxy}${sitePath}</url>\r
228                 </site>\r
229         </distributionManagement>\r
230 \r
231 </project>\r