Improve code coverage for aaf authz modules
[aaf/authz.git] / pom.xml
1 <!--
2   ============LICENSE_START====================================================
3   * org.onap.aaf
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   * 
11    *      http://www.apache.org/licenses/LICENSE-2.0
12   * 
13    * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * ============LICENSE_END====================================================
19   *
20   * ECOMP is a trademark and service mark of AT&T Intellectual Property.
21   *
22 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25
26         <modelVersion>4.0.0</modelVersion>
27         <groupId>org.onap.aaf.authz</groupId>
28         <artifactId>parent</artifactId>
29         <version>1.0.1-SNAPSHOT</version>
30         <name>aaf-authz</name>
31         <packaging>pom</packaging>
32         <url>https://github.com/att/AAF</url>
33         
34         <parent>             
35         <groupId>org.onap.oparent</groupId>
36         <artifactId>oparent</artifactId>
37         <version>0.1.1</version>
38     </parent>
39         
40         <licenses>
41                 <license>
42                 <name>BSD License</name>
43                 <url> </url>
44                 </license>
45         </licenses>
46         <developers>
47                 <developer>
48                 <name>Jonathan Gathman</name>
49                 <email></email>
50         <organization>ATT</organization>
51         <organizationUrl></organizationUrl>
52                 </developer>
53         </developers>
54         <description>This module is used to organize all of the common SWM (Software Manager) 
55                 artifacts and capabilities that are inherited by all modules that are SWM
56                 packaged.  This prevents duplication of these common artifacts, plugins, and 
57                 other settings and provides a single place to support this configuration.
58         </description>
59         <properties>
60                 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
61                 <skipTests>false</skipTests>
62                 <project.interfaceVersion>1.0.0-SNAPSHOT</project.interfaceVersion>
63                 <project.innoVersion>1.0.0-SNAPSHOT</project.innoVersion>
64                 <project.cadiVersion>1.0.0-SNAPSHOT</project.cadiVersion>
65                 <project.dme2Version>3.1.200</project.dme2Version>
66                 <sonar.language>java</sonar.language>
67                 <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
68                 <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
69                 <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
70                 <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
71                 <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
72                 <sonar.projectVersion>${project.version}</sonar.projectVersion>
73                 <nexusproxy>https://nexus.onap.org</nexusproxy>
74                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
75                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
76                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
77                 <sitePath>/content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version}</sitePath>
78         </properties>
79         <build>
80                 <pluginManagement>
81                 <plugins>
82                           <plugin>
83                                         <groupId>org.apache.maven.plugins</groupId>
84                                         <artifactId>maven-compiler-plugin</artifactId>
85                                         <version>2.3.2</version> 
86                                         <configuration>
87                                                 <source>1.8</source>
88                                                 <target>1.8</target>
89                                         </configuration>
90                                 </plugin>
91                                 
92         
93                                 <plugin>
94                                   <groupId>org.apache.maven.plugins</groupId>
95                                   <artifactId>maven-surefire-plugin</artifactId>
96                                   <version>2.17</version>
97                                   <configuration>
98                                         <skipTests>${skipTests}</skipTests>
99                                         <includes>
100                                           <include>**/JU*.java</include>
101                                         </includes>
102                                         <excludes>
103                                 
104                                                 <exclude>**/JU_DataFile.java</exclude>
105                                         <exclude>**/JU_ArtiDAO.java</exclude>
106                                         <exclude>**/JU_CertDAO.java</exclude>
107                                         <exclude>**/JU_FastCalling.java</exclude>
108                                         <exclude>**/JU_NsDAO.java</exclude>
109                                           <!-- <exclude>**/authz-cass/**</exclude> -->
110                                           <!-- <exclude>**/JU_UseCase1.java</exclude> -->
111                                           <exclude>**/JU_RoleDAO.java</exclude>
112                                           <exclude>**/JU_PermDAO.java</exclude>
113                                            <exclude>**/JU_Question.java</exclude> 
114                                           <!-- <exclude>**/JU_NS.java</exclude> -->
115                                           <exclude>**/JU_HistoryDAO.java</exclude>                                
116                                           <exclude>**/JU_DelegateDAO.java</exclude>
117                                           <exclude>**/JU_CredDAO.java</exclude>
118                                           <exclude>**/JU_CacheInfoDAO.java</exclude>
119                                           <exclude>**/JU_ApprovalDAO.java</exclude>
120                                           <exclude>**/JU_Define.java</exclude>
121                                           <exclude>**/JU_AuthzTransFilter.java</exclude>
122                                           <exclude>**/JU_CachingFileAccess.java</exclude>
123                                           <!-- <exclude>**/AbsServiceTest.java</exclude> -->
124                                           <exclude>**/JU_DefaultOrg.java</exclude>
125                                           <exclude>**/JU_FileServer.java</exclude>
126                                           <exclude>**/JU_DirectAAFLur.java</exclude>
127                                           <exclude>**/JU_AuthAPI.java</exclude>
128                                           <exclude>**/JU_GwAPI.java</exclude>  
129                                           
130                                           <!-- <exclude>**/JU_Perm_2_0*.java</exclude> -->
131                                           <!-- <exclude>**/JU_Role_2_0*.java</exclude>                             -->
132                         
133                                         </excludes>
134         
135                                   </configuration>
136                                 </plugin>
137         
138                                 <plugin>
139                                         <groupId>org.codehaus.mojo</groupId>
140                                         <artifactId>jaxb2-maven-plugin</artifactId>
141                                         <version>1.3</version>
142                                         <executions>
143                                                 <execution>
144                                                         <phase>generate-sources</phase>
145                                                         <goals>
146                                                                 <goal>xjc</goal>
147                                                         </goals>
148                                                 </execution>
149                                         </executions>
150                                         <configuration>
151                                                 <schemaDirectory>src/main/xsd</schemaDirectory>
152                                         </configuration>
153                                 </plugin>
154         
155                                 <plugin>
156                                   <groupId>org.apache.maven.plugins</groupId>
157                                   <artifactId>maven-failsafe-plugin</artifactId>
158                                   <version>2.17</version>
159                                   <configuration>
160                                                 <skipTests>true</skipTests>
161                                   </configuration>
162                                   <executions>
163                                         <execution>
164                                           <id>integration-test</id>
165                                           <goals>
166                                                 <goal>integration-test</goal>
167                                                 <goal>verify</goal>
168                                           </goals>
169                                         </execution>
170                                   </executions>
171                                 </plugin>
172                                 <plugin>
173                                         <groupId>org.apache.maven.plugins</groupId>
174                                         <artifactId>maven-jarsigner-plugin</artifactId>
175                                         <version>1.2</version>
176                                         <executions>
177                                                 <execution>
178                                                         <id>sign</id>
179                                                         <goals>
180                                                                 <goal>sign</goal>
181                                                         </goals>
182                                                         <configuration>
183                                                                 <!--  skip>${skipSigning}</skip -->
184                                                                 <archive>target/${project.artifactId}-${project.version}.jar</archive>
185                                                         </configuration>
186                                                 </execution>
187                                                 <execution>
188                                                         <id>verify</id>
189                                                         <goals>
190                                                                 <goal>verify</goal>
191                                                         </goals>
192                                                         <configuration>
193                                                                 <archive>target/${project.artifactId}-${project.version}.jar</archive>
194                                                         </configuration>
195                                                 </execution>
196                                         </executions>
197                                         <configuration>
198                                                 <skip>true</skip>
199                                                 <alias>aaf</alias>
200                                                 <keystore>/Volumes/Data/src/cadi/keys/aaf_cadi.jks</keystore>
201                                                 <storepass>Surprise!</storepass>
202                                                 <keypass>Surprise!</keypass>
203                                                 <verbose>true</verbose>
204                                                 <certs>true</certs>
205                                         </configuration>
206                                 </plugin>
207                                 
208                 <plugin>
209                         <groupId>org.apache.maven.plugins</groupId>
210                         <artifactId>maven-javadoc-plugin</artifactId>
211                         <version>2.10.4</version>
212                         <configuration>
213                         <failOnError>false</failOnError>
214                         </configuration>
215                         <executions>
216                                 <execution>
217                                         <id>attach-javadocs</id>
218                                         <goals>
219                                                 <goal>jar</goal>
220                                         </goals>
221                                 </execution>
222                         </executions>
223                 </plugin> 
224
225
226            
227                <plugin>
228                       <groupId>org.apache.maven.plugins</groupId>
229                       <artifactId>maven-source-plugin</artifactId>
230                       <version>2.2.1</version>
231                       <executions>
232                         <execution>
233                           <id>attach-sources</id>
234                           <goals>
235                             <goal>jar-no-fork</goal>
236                           </goals>
237                         </execution>
238                       </executions>
239                     </plugin>
240
241                         
242                 <plugin>
243                                 <groupId>org.codehaus.mojo</groupId>
244                                 <artifactId>cobertura-maven-plugin</artifactId>
245                                 <version>2.7</version>
246                                 <configuration>
247                                         <formats>
248                                         <format>html</format>
249                                         <format>xml</format>
250                                   </formats>
251                                 </configuration>
252                         </plugin>
253                 <plugin>
254                                 <groupId>org.sonatype.plugins</groupId>
255                                 <artifactId>nexus-staging-maven-plugin</artifactId>
256                                 <version>1.6.7</version>
257                                 <extensions>true</extensions>
258                                 <configuration>
259                                         <nexusUrl>${nexusproxy}</nexusUrl>
260                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
261                                         <serverId>ecomp-staging</serverId>
262                                 </configuration>
263                         </plugin>               
264                         <plugin>
265           <groupId>org.jacoco</groupId>
266           <artifactId>jacoco-maven-plugin</artifactId>
267           <version>${jacoco.version}</version>
268           <configuration>
269             <!-- Note: This exclusion list should match <sonar.exclusions>
270          property above -->
271             <excludes>
272               <exclude>**/gen/**</exclude>
273               <exclude>**/generated-sources/**</exclude>
274               <exclude>**/yang-gen/**</exclude>
275               <exclude>**/pax/**</exclude>
276             </excludes>
277           </configuration>
278           <executions>
279             <!--
280         Prepares the property pointing to the JaCoCo runtime agent which
281         is passed as VM argument when Maven the Surefire plugin is executed.
282         -->
283             <execution>
284               <id>pre-unit-test</id>
285               <goals>
286                 <goal>prepare-agent</goal>
287               </goals>
288               <configuration>
289                 <!-- Sets the path to the file which contains the execution data. -->
290                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
291                 <!--
292             Sets the name of the property containing the settings
293             for JaCoCo runtime agent.
294         -->
295                 <propertyName>surefireArgLine</propertyName>
296               </configuration>
297             </execution>
298             <!--
299         Ensures that the code coverage report for unit tests is created after
300         unit tests have been run.
301         -->
302             <execution>
303               <id>post-unit-test</id>
304               <phase>test</phase>
305               <goals>
306                 <goal>report</goal>
307               </goals>
308               <configuration>
309                 <!-- Sets the path to the file which contains the execution data. -->
310                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
311                 <!-- Sets the output directory for the code coverage report. -->
312                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
313               </configuration>
314             </execution>
315             <execution>
316               <id>pre-integration-test</id>
317               <phase>pre-integration-test</phase>
318               <goals>
319                 <goal>prepare-agent</goal>
320               </goals>
321               <configuration>
322                 <!-- Sets the path to the file which contains the execution data. -->
323                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
324                 <!--
325             Sets the name of the property containing the settings
326             for JaCoCo runtime agent.
327         -->
328                 <propertyName>failsafeArgLine</propertyName>
329               </configuration>
330             </execution>
331             <!--
332         Ensures that the code coverage report for integration tests after
333         integration tests have been run.
334         -->
335             <execution>
336               <id>post-integration-test</id>
337               <phase>post-integration-test</phase>
338               <goals>
339                 <goal>report</goal>
340               </goals>
341               <configuration>
342                 <!-- Sets the path to the file which contains the execution data. -->
343                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
344                 <!-- Sets the output directory for the code coverage report. -->
345                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
346               </configuration>
347             </execution>
348           </executions>
349         </plugin>                    
350
351                                 
352                 </plugins>
353                 </pluginManagement>                     
354     </build>    
355         
356         <dependencies> 
357                 <dependency>
358                         <groupId>junit</groupId>
359                         <artifactId>junit</artifactId>
360                         <version>4.10</version>
361                         <scope>test</scope>
362                 </dependency>
363
364                 <dependency>
365                     <groupId>org.mockito</groupId>
366                     <artifactId>mockito-core</artifactId>
367                     <version>1.10.19</version>
368                     <scope>test</scope>
369                 </dependency>
370                 <dependency>
371                     <groupId>org.powermock</groupId>
372                     <artifactId>powermock-module-junit4</artifactId>
373                     <version>1.6.4</version>
374                     <scope>test</scope>
375                 </dependency>
376                 <dependency>
377                     <groupId>org.powermock</groupId>
378                     <artifactId>powermock-api-mockito</artifactId>
379                     <version>1.6.4</version>
380                     <scope>test</scope>
381                 </dependency> 
382
383          
384         </dependencies>         
385
386         <modules>
387                 <!-- 
388                    <module> auth-client</module>
389                    complile manually with mvn -N independently
390                 -->
391                 <module>authz-client</module>
392                 <module>authz-core</module>
393                 <module>authz-cass</module>
394                 <module>authz-defOrg</module>
395                 <module>authz-cmd</module>
396                 <!--  <module>authz-batch</module>-->
397                 <module>authz-test</module>
398                 <!--  <module>authz-gui</module> -->
399                 <module>authz-gw</module>
400                 <module>authz-certman</module>
401                 <module>authz-fs</module>
402                 <module>authz-service</module>
403         </modules>
404         
405         <dependencyManagement>
406                 <dependencies>
407                         <dependency>
408                                 <groupId>org.onap.aaf.inno</groupId>
409                                 <artifactId>env</artifactId>
410                                 <version>${project.innoVersion}</version>
411                         </dependency>
412
413                         <dependency>
414                                 <groupId>org.onap.aaf.inno</groupId>
415                                 <artifactId>log4j</artifactId>
416                                 <version>${project.innoVersion}</version>
417                         </dependency>
418
419                         <dependency>
420                                 <groupId>org.onap.aaf.inno</groupId>
421                                 <artifactId>rosetta</artifactId>
422                                 <version>${project.innoVersion}</version>
423                         </dependency>
424
425                         <dependency>
426                                 <groupId>org.onap.aaf.inno</groupId>
427                                 <artifactId>xgen</artifactId>
428                                 <version>${project.innoVersion}</version>
429                         </dependency>
430                         
431                         <dependency>
432                                 <groupId>org.onap.aaf.cadi</groupId>
433                                 <artifactId>cadi-core</artifactId>
434                                 <version>${project.cadiVersion}</version>
435                         </dependency>
436
437                         <dependency>
438                                 <groupId>org.onap.aaf.cadi</groupId>
439                                 <artifactId>cadi-client</artifactId>
440                                 <version>${project.cadiVersion}</version>
441                         </dependency>
442                         
443                         
444                         <dependency>
445                                 <groupId>org.onap.aaf.cadi</groupId>
446                                 <artifactId>cadi-aaf</artifactId>
447                                 <version>${project.cadiVersion}</version>
448                                 <exclusions>
449                               <exclusion> 
450                                         <groupId>org.apache.cassandra</groupId>
451                                 <artifactId>cassandra-all</artifactId>
452                       </exclusion>
453                             </exclusions> 
454                         </dependency>
455                         
456                         <dependency>
457                                 <groupId>org.onap.aaf.authz</groupId>
458                                 <artifactId>authz-client</artifactId>
459                                 <version>${project.interfaceVersion}</version>
460                         </dependency>
461                         
462                         
463                         <dependency>
464                                 <groupId>org.onap.aaf.authz</groupId>
465                                 <artifactId>authz-core</artifactId>
466                                 <version>${project.version}</version>
467                         </dependency>
468                         
469                         <dependency>
470                     <groupId>org.onap.aaf.authz</groupId>
471                     <artifactId>authz-cass</artifactId>
472                                 <version>${project.version}</version>
473                 </dependency>
474                 
475                 <dependency>
476                                 <groupId>org.onap.aaf.authz</groupId>
477                                 <artifactId>authz-batch</artifactId>
478                                 <version>${project.interfaceVersion}</version>
479                         </dependency>
480             
481
482
483                     <dependency>
484                     <groupId>org.onap.aaf.authz</groupId>
485                     <artifactId>authz-cmd</artifactId>
486                                 <version>${project.version}</version>
487                 </dependency>
488                 <dependency>
489                     <groupId>org.onap.aaf.authz</groupId>
490                     <artifactId>authz-gw</artifactId>
491                                 <version>${project.version}</version>
492                 </dependency>
493
494                         <dependency>
495                                 <groupId>com.att.aft</groupId>
496                                 <artifactId>dme2</artifactId>
497                                 <version>${project.dme2Version}</version>
498                         </dependency>
499                 
500                         <dependency>
501                           <groupId>javax.servlet</groupId>
502                           <artifactId>servlet-api</artifactId>
503                           <version>2.5</version>
504                         </dependency>
505                         
506                         <dependency>
507                                 <groupId>org.eclipse.jetty</groupId>
508                                 <artifactId>jetty-servlet</artifactId>
509                                 <version>9.0.3.v20130506</version>
510                         </dependency>
511                         
512                         <dependency>
513                                 <groupId>com.datastax.cassandra</groupId>
514                                 <artifactId>cassandra-all</artifactId>
515                                 <version>2.1.10</version>
516                                 <exclusions>
517                               <exclusion> 
518                                 <groupId>org.slf4j</groupId>
519                                 <artifactId>slf4j-log4j12</artifactId>
520                               </exclusion>
521                               <exclusion> 
522                                 <groupId>log4j</groupId>
523                                 <artifactId>log4j</artifactId>
524                               </exclusion>
525                             </exclusions> 
526                         </dependency>
527                         <dependency>
528                                 <groupId>com.datastax.cassandra</groupId>
529                                 <artifactId>cassandra-driver-core</artifactId>
530                                 <!-- version>1.0.3</version -->
531                                 <!-- version>1.0.5</version -->
532                                 <version>2.1.10</version>
533                                 <exclusions>
534                               <exclusion> 
535                                 <groupId>org.slf4j</groupId>
536                                 <artifactId>slf4j-log4j12</artifactId>
537                               </exclusion>
538                               <exclusion> 
539                                 <groupId>log4j</groupId>
540                                 <artifactId>log4j</artifactId>
541                               </exclusion>
542                             </exclusions> 
543                         </dependency>   
544
545                         <dependency>
546                                 <groupId>org.slf4j</groupId>
547                                 <artifactId>slf4j-log4j12</artifactId>
548                                 <version>1.7.5</version>
549                         </dependency>
550
551                         <dependency>
552                         <groupId>javax.mail</groupId>
553                         <artifactId>mail</artifactId>
554                         <version>1.4.5</version>
555                 </dependency> 
556
557                         
558                 </dependencies>
559         </dependencyManagement>
560         <distributionManagement>
561                 <repository>
562                         <id>ecomp-releases</id>
563                         <name>AAF Release Repository</name>
564                         <url>${nexusproxy}${releaseNexusPath}</url>
565                 </repository>
566                 <snapshotRepository>
567                         <id>ecomp-snapshots</id>
568                         <name>AAF Snapshot Repository</name>
569                         <url>${nexusproxy}${snapshotNexusPath}</url>
570                 </snapshotRepository>
571                 <site>
572                         <id>ecomp-site</id>
573                         <url>dav:${nexusproxy}${sitePath}</url>
574                 </site>
575         </distributionManagement>
576
577 </project>