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  -->\r
41                  <jacoco.version>0.7.7.201606060606</jacoco.version>\r
42             <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>\r
43             <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>\r
44             <!-- Default Sonar configuration -->\r
45             <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>\r
46             <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>\r
47             <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->\r
48             <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>\r
49         <nexusproxy>https://nexus.onap.org</nexusproxy>\r
50                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>\r
51                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
52                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
53                 <sitePath>/content/sites/site/org/onap/aaf/cadi/${project.artifactId}/${project.version}</sitePath>\r
54         </properties>\r
55         \r
56         <dependencies>\r
57         <dependency>\r
58                         <groupId>org.mockito</groupId>\r
59                         <artifactId>mockito-all</artifactId>\r
60                         <version>1.9.5</version>\r
61                         <scope>test</scope>\r
62                         </dependency>\r
63                 <dependency>\r
64                         <groupId>org.onap.aaf.authz</groupId>\r
65                         <artifactId>authz-client</artifactId>\r
66                 </dependency> \r
67 \r
68                   <dependency>\r
69                         <groupId>org.onap.aaf.cadi</groupId>\r
70                         <artifactId>cadi-client</artifactId>\r
71                 </dependency> \r
72 \r
73                 <dependency>\r
74                         <groupId>org.onap.aaf.cadi</groupId>\r
75                         <artifactId>cadi-client</artifactId>\r
76                 </dependency>\r
77                 \r
78                 <dependency>\r
79                         <groupId>com.att.aft</groupId>\r
80                         <artifactId>dme2</artifactId>\r
81                         <scope>provided</scope>\r
82                 </dependency>\r
83                 \r
84                 <dependency>\r
85                     <groupId>javax.servlet</groupId>\r
86                     <artifactId>javax.servlet-api</artifactId>\r
87                     <version>3.0.1</version>\r
88                         <scope>provided</scope>\r
89                 </dependency>\r
90 \r
91                 <dependency>\r
92                         <groupId>org.slf4j</groupId>\r
93                     <artifactId>slf4j-log4j12</artifactId>\r
94                     <version>1.7.5</version>\r
95                     <scope>test</scope>\r
96                 </dependency>\r
97 \r
98         </dependencies>\r
99         <build>\r
100                 <plugins> \r
101                         <plugin>\r
102                                 <groupId>org.apache.maven.plugins</groupId>\r
103                                 <artifactId>maven-compiler-plugin</artifactId>\r
104                                 <version>2.3.2</version>\r
105                         </plugin>\r
106                 \r
107                                 <!-- We want to create a Jar with Rosetta built in (since I don't want \r
108                                 a separate deployment at this time Use this one as the jar to put in SWM \r
109                                 packages -->\r
110                         <plugin>\r
111                                 <artifactId>maven-assembly-plugin</artifactId>\r
112                                 <configuration>\r
113                                         <classifier>tests</classifier>\r
114                                         <archive>\r
115                                                 <manifest>\r
116                                                         <mainClass>org.onap.aaf.cadi.cm.CmAgent</mainClass>\r
117                                                 </manifest>\r
118 \r
119                                                 <manifestEntries>\r
120                                                         <Sealed>true</Sealed>\r
121                                                 </manifestEntries>\r
122                                         </archive>\r
123                                 </configuration>\r
124                                 <executions>\r
125                                         <execution>\r
126                                                 <id>full</id>\r
127                                                 <phase>package</phase>\r
128                                                 <goals>\r
129                                                         <goal>single</goal>\r
130                                                 </goals>\r
131                                                 <configuration>\r
132                                                         <descriptors>\r
133                                                                 <descriptor>src/assemble/cadi-aaf.xml</descriptor>\r
134                                                         </descriptors>\r
135                                                 </configuration>\r
136                                         </execution>\r
137                                 </executions>\r
138                         </plugin>\r
139                 <plugin>\r
140                         <groupId>org.apache.maven.plugins</groupId>\r
141                         <artifactId>maven-javadoc-plugin</artifactId>\r
142                         <version>2.10.4</version>\r
143                         <configuration>\r
144                         <failOnError>false</failOnError>\r
145                         </configuration>\r
146                         <executions>\r
147                                 <execution>\r
148                                         <id>attach-javadocs</id>\r
149                                         <goals>\r
150                                                 <goal>jar</goal>\r
151                                         </goals>\r
152                                 </execution>\r
153                         </executions>\r
154                 </plugin> \r
155            \r
156            \r
157                <plugin>\r
158                       <groupId>org.apache.maven.plugins</groupId>\r
159                       <artifactId>maven-source-plugin</artifactId>\r
160                       <version>2.2.1</version>\r
161                       <executions>\r
162                         <execution>\r
163                           <id>attach-sources</id>\r
164                           <goals>\r
165                             <goal>jar-no-fork</goal>\r
166                           </goals>\r
167                         </execution>\r
168                       </executions>\r
169                     </plugin>\r
170         \r
171 \r
172 \r
173                         <plugin>\r
174                                 <!-- Also sign "full" -->\r
175                                 <groupId>org.apache.maven.plugins</groupId>\r
176                                 <artifactId>maven-jarsigner-plugin</artifactId>\r
177                                 <configuration>\r
178                                         <skip>true</skip>\r
179                                 </configuration>\r
180                                 <executions>\r
181                                         <execution>\r
182                                                 <id>sign-full</id>\r
183                                                 <goals>\r
184                                                         <goal>sign</goal>\r
185                                                 </goals>\r
186                                                 <configuration>\r
187                                                         <archive>target/${project.artifactId}-${project.version}-full.jar</archive>\r
188                                                 </configuration>\r
189                                         </execution>\r
190                                         <execution>\r
191                                                 <id>verify-full</id>\r
192                                                 <goals>\r
193                                                         <goal>verify</goal>\r
194                                                 </goals>\r
195                                                 <configuration>\r
196                                                         <archive>target/${project.artifactId}-${project.version}-full.jar</archive>\r
197                                                 </configuration>\r
198                                         </execution>\r
199                                 </executions>\r
200                         </plugin>\r
201                   <plugin>\r
202                                 <groupId>org.sonatype.plugins</groupId>\r
203                                 <artifactId>nexus-staging-maven-plugin</artifactId>\r
204                                 <version>1.6.7</version>\r
205                                 <extensions>true</extensions>\r
206                                 <configuration>\r
207                                         <nexusUrl>${nexusproxy}</nexusUrl>\r
208                                         <stagingProfileId>176c31dfe190a</stagingProfileId>\r
209                                         <serverId>ecomp-staging</serverId>\r
210                                 </configuration>\r
211                         </plugin> \r
212                         \r
213                         <plugin>\r
214           <groupId>org.jacoco</groupId>\r
215           <artifactId>jacoco-maven-plugin</artifactId>\r
216           <version>${jacoco.version}</version>\r
217           <configuration>\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             <execution>\r
228               <id>pre-unit-test</id>\r
229               <goals>\r
230                 <goal>prepare-agent</goal>\r
231               </goals>\r
232               <configuration>\r
233                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>\r
234                 <propertyName>surefireArgLine</propertyName>\r
235               </configuration>\r
236             </execution>\r
237             \r
238        \r
239             <execution>\r
240               <id>post-unit-test</id>\r
241               <phase>test</phase>\r
242               <goals>\r
243                 <goal>report</goal>\r
244               </goals>\r
245               <configuration>\r
246                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>\r
247                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>\r
248               </configuration>\r
249             </execution>\r
250             <execution>\r
251               <id>pre-integration-test</id>\r
252               <phase>pre-integration-test</phase>\r
253               <goals>\r
254                 <goal>prepare-agent</goal>\r
255               </goals>\r
256               <configuration>\r
257                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>\r
258 \r
259                 <propertyName>failsafeArgLine</propertyName>\r
260               </configuration>\r
261             </execution>\r
262 \r
263        \r
264             <execution>\r
265               <id>post-integration-test</id>\r
266               <phase>post-integration-test</phase>\r
267               <goals>\r
268                 <goal>report</goal>\r
269               </goals>\r
270               <configuration>\r
271                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>\r
272                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>\r
273               </configuration>\r
274             </execution>\r
275           </executions>\r
276         </plugin>       \r
277 \r
278                 </plugins>\r
279         </build>\r
280                 <distributionManagement>\r
281                 <repository>\r
282                         <id>ecomp-releases</id>\r
283                         <name>AAF Release Repository</name>\r
284                         <url>${nexusproxy}${releaseNexusPath}</url>\r
285                 </repository>\r
286                 <snapshotRepository>\r
287                         <id>ecomp-snapshots</id>\r
288                         <name>AAF Snapshot Repository</name>\r
289                         <url>${nexusproxy}${snapshotNexusPath}</url>\r
290                 </snapshotRepository>\r
291                 <site>\r
292                         <id>ecomp-site</id>\r
293                         <url>dav:${nexusproxy}${sitePath}</url>\r
294                 </site>\r
295         </distributionManagement>\r
296 \r
297 </project>\r