Improve code coverage for aaf cadi modules
[aaf/cadi.git] / aaf / 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         <modelVersion>4.0.0</modelVersion>\r
32         <name>CADI AAF (Application Authorization Framework) LUR</name>\r
33         <packaging>jar</packaging>\r
34         <url>https://github.com/att/AAF</url>\r
35         <description>CADI</description>\r
36         <artifactId>cadi-aaf</artifactId>\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         \r
54         <dependencies>\r
55         <dependency>\r
56                         <groupId>org.mockito</groupId>\r
57                         <artifactId>mockito-all</artifactId>\r
58                         <version>1.9.5</version>\r
59                         <scope>test</scope>\r
60                         </dependency>\r
61                 <dependency>\r
62                         <groupId>org.onap.aaf.authz</groupId>\r
63                         <artifactId>authz-client</artifactId>\r
64                 </dependency> \r
65 \r
66                   <dependency>\r
67                         <groupId>org.onap.aaf.cadi</groupId>\r
68                         <artifactId>cadi-client</artifactId>\r
69                 </dependency> \r
70 \r
71                 <dependency>\r
72                         <groupId>org.onap.aaf.cadi</groupId>\r
73                         <artifactId>cadi-client</artifactId>\r
74                 </dependency>\r
75                 \r
76                 <dependency>\r
77                         <groupId>com.att.aft</groupId>\r
78                         <artifactId>dme2</artifactId>\r
79                         <scope>provided</scope>\r
80                 </dependency>\r
81                 \r
82                 <dependency>\r
83                     <groupId>javax.servlet</groupId>\r
84                     <artifactId>javax.servlet-api</artifactId>\r
85                     <version>3.0.1</version>\r
86                         <scope>provided</scope>\r
87                 </dependency>\r
88 \r
89                 <dependency>\r
90                         <groupId>org.slf4j</groupId>\r
91                     <artifactId>slf4j-log4j12</artifactId>\r
92                     <version>1.7.5</version>\r
93                     <scope>test</scope>\r
94                 </dependency>\r
95 \r
96         </dependencies>\r
97         <build>\r
98                 <plugins> \r
99                         <plugin>\r
100                                 <groupId>org.apache.maven.plugins</groupId>\r
101                                 <artifactId>maven-compiler-plugin</artifactId>\r
102                                 <version>2.3.2</version>\r
103                         </plugin>\r
104                 \r
105                                 <!-- We want to create a Jar with Rosetta built in (since I don't want \r
106                                 a separate deployment at this time Use this one as the jar to put in SWM \r
107                                 packages -->\r
108                         <plugin>\r
109                                 <artifactId>maven-assembly-plugin</artifactId>\r
110                                 <configuration>\r
111                                         <classifier>tests</classifier>\r
112                                         <archive>\r
113                                                 <manifest>\r
114                                                         <mainClass>org.onap.aaf.cadi.cm.CmAgent</mainClass>\r
115                                                 </manifest>\r
116 \r
117                                                 <manifestEntries>\r
118                                                         <Sealed>true</Sealed>\r
119                                                 </manifestEntries>\r
120                                         </archive>\r
121                                 </configuration>\r
122                                 <executions>\r
123                                         <execution>\r
124                                                 <id>full</id>\r
125                                                 <phase>package</phase>\r
126                                                 <goals>\r
127                                                         <goal>single</goal>\r
128                                                 </goals>\r
129                                                 <configuration>\r
130                                                         <descriptors>\r
131                                                                 <descriptor>src/assemble/cadi-aaf.xml</descriptor>\r
132                                                         </descriptors>\r
133                                                 </configuration>\r
134                                         </execution>\r
135                                 </executions>\r
136                         </plugin>\r
137                 <plugin>\r
138                         <groupId>org.apache.maven.plugins</groupId>\r
139                         <artifactId>maven-javadoc-plugin</artifactId>\r
140                         <version>2.10.4</version>\r
141                         <configuration>\r
142                         <failOnError>false</failOnError>\r
143                         </configuration>\r
144                         <executions>\r
145                                 <execution>\r
146                                         <id>attach-javadocs</id>\r
147                                         <goals>\r
148                                                 <goal>jar</goal>\r
149                                         </goals>\r
150                                 </execution>\r
151                         </executions>\r
152                 </plugin> \r
153            \r
154            \r
155                <plugin>\r
156                       <groupId>org.apache.maven.plugins</groupId>\r
157                       <artifactId>maven-source-plugin</artifactId>\r
158                       <version>2.2.1</version>\r
159                       <executions>\r
160                         <execution>\r
161                           <id>attach-sources</id>\r
162                           <goals>\r
163                             <goal>jar-no-fork</goal>\r
164                           </goals>\r
165                         </execution>\r
166                       </executions>\r
167                     </plugin>\r
168         \r
169 \r
170 \r
171                         <plugin>\r
172                                 <!-- Also sign "full" -->\r
173                                 <groupId>org.apache.maven.plugins</groupId>\r
174                                 <artifactId>maven-jarsigner-plugin</artifactId>\r
175                                 <configuration>\r
176                                         <skip>true</skip>\r
177                                 </configuration>\r
178                                 <executions>\r
179                                         <execution>\r
180                                                 <id>sign-full</id>\r
181                                                 <goals>\r
182                                                         <goal>sign</goal>\r
183                                                 </goals>\r
184                                                 <configuration>\r
185                                                         <archive>target/${project.artifactId}-${project.version}-full.jar</archive>\r
186                                                 </configuration>\r
187                                         </execution>\r
188                                         <execution>\r
189                                                 <id>verify-full</id>\r
190                                                 <goals>\r
191                                                         <goal>verify</goal>\r
192                                                 </goals>\r
193                                                 <configuration>\r
194                                                         <archive>target/${project.artifactId}-${project.version}-full.jar</archive>\r
195                                                 </configuration>\r
196                                         </execution>\r
197                                 </executions>\r
198                         </plugin>\r
199                   <plugin>\r
200                                 <groupId>org.sonatype.plugins</groupId>\r
201                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
202                                 <version>1.6.7</version>\r
203                                 <extensions>true</extensions>\r
204                                 <configuration>\r
205                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
206                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
207                                         <serverId>ecomp-staging</serverId>\r
208                                 </configuration>\r
209                         </plugin> \r
210                         \r
211                         <plugin>\r
212           <groupId>org.jacoco</groupId>\r
213           <artifactId>jacoco-maven-plugin</artifactId>\r
214           <version>${jacoco.version}</version>\r
215           <configuration>\r
216             <!-- Note: This exclusion list should match <sonar.exclusions>\r
217          property above -->\r
218             <excludes>\r
219               <exclude>**/gen/**</exclude>\r
220               <exclude>**/generated-sources/**</exclude>\r
221               <exclude>**/yang-gen/**</exclude>\r
222               <exclude>**/pax/**</exclude>\r
223             </excludes>\r
224           </configuration>\r
225           <executions>\r
226             <!--\r
227         Prepares the property pointing to the JaCoCo runtime agent which\r
228         is passed as VM argument when Maven the Surefire plugin is executed.\r
229         -->\r
230             <execution>\r
231               <id>pre-unit-test</id>\r
232               <goals>\r
233                 <goal>prepare-agent</goal>\r
234               </goals>\r
235               <configuration>\r
236                 <!-- Sets the path to the file which contains the execution data. -->\r
237                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
238                 <!--\r
239             Sets the name of the property containing the settings\r
240             for JaCoCo runtime agent.\r
241         -->\r
242                 <propertyName>surefireArgLine</propertyName>\r
243               </configuration>\r
244             </execution>\r
245             <!--\r
246         Ensures that the code coverage report for unit tests is created after\r
247         unit tests have been run.\r
248         -->\r
249             <execution>\r
250               <id>post-unit-test</id>\r
251               <phase>test</phase>\r
252               <goals>\r
253                 <goal>report</goal>\r
254               </goals>\r
255               <configuration>\r
256                 <!-- Sets the path to the file which contains the execution data. -->\r
257                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
258                 <!-- Sets the output directory for the code coverage report. -->\r
259                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
260               </configuration>\r
261             </execution>\r
262             <execution>\r
263               <id>pre-integration-test</id>\r
264               <phase>pre-integration-test</phase>\r
265               <goals>\r
266                 <goal>prepare-agent</goal>\r
267               </goals>\r
268               <configuration>\r
269                 <!-- Sets the path to the file which contains the execution data. -->\r
270                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
271                 <!--\r
272             Sets the name of the property containing the settings\r
273             for JaCoCo runtime agent.\r
274         -->\r
275                 <propertyName>failsafeArgLine</propertyName>\r
276               </configuration>\r
277             </execution>\r
278             <!--\r
279         Ensures that the code coverage report for integration tests after\r
280         integration tests have been run.\r
281         -->\r
282             <execution>\r
283               <id>post-integration-test</id>\r
284               <phase>post-integration-test</phase>\r
285               <goals>\r
286                 <goal>report</goal>\r
287               </goals>\r
288               <configuration>\r
289                 <!-- Sets the path to the file which contains the execution data. -->\r
290                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
291                 <!-- Sets the output directory for the code coverage report. -->\r
292                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
293               </configuration>\r
294             </execution>\r
295           </executions>\r
296         </plugin>                    \r
297 \r
298                 </plugins>\r
299         </build>\r
300                 <distributionManagement>\r
301                 <repository>\r
302                         <id>ecomp-releases</id>\r
303                         <name>AAF Release Repository</name>\r
304                         <url>${nexusproxy}${releaseNexusPath}</url>\r
305                 </repository>\r
306                 <snapshotRepository>\r
307                         <id>ecomp-snapshots</id>\r
308                         <name>AAF Snapshot Repository</name>\r
309                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
310                 </snapshotRepository>\r
311                 <site>\r
312                         <id>ecomp-site</id>\r
313                         <url>dav:${nexusproxy}${sitePath}</url>\r
314                 </site>\r
315         </distributionManagement>\r
316 \r
317 </project>\r