add unit tests cases for autz
[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  -->
67                  <jacoco.version>0.7.7.201606060606</jacoco.version>
68             <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
69             <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
70             <!-- Default Sonar configuration -->
71             <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
72             <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
73             <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
74             <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
75                 <nexusproxy>https://nexus.onap.org</nexusproxy>
76                 <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
77                 <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
78                 <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
79                 <sitePath>/content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version}</sitePath>
80         </properties>
81         <build>
82                 <pluginManagement>
83                 <plugins>
84                           <plugin>
85                                         <groupId>org.apache.maven.plugins</groupId>
86                                         <artifactId>maven-compiler-plugin</artifactId>
87                                         <version>2.3.2</version> 
88                                         <configuration>
89                                                 <source>1.8</source>
90                                                 <target>1.8</target>
91                                         </configuration>
92                                 </plugin>
93                                 
94         
95                                 <plugin>
96                                   <groupId>org.apache.maven.plugins</groupId>
97                                   <artifactId>maven-surefire-plugin</artifactId>
98                                   <version>2.17</version>
99                                   <configuration>
100                                         <skipTests>${skipTests}</skipTests>
101                                         <includes>
102                                           <include>**/JU*.java</include>
103                                         </includes>
104                                         <excludes>
105                                 
106                                                 <exclude>**/JU_DataFile.java</exclude>
107                                         <exclude>**/JU_ArtiDAO.java</exclude>
108                                         <exclude>**/JU_CertDAO.java</exclude>
109                                         <exclude>**/JU_FastCalling.java</exclude>
110                                         <exclude>**/JU_NsDAO.java</exclude>
111                                           <!-- <exclude>**/authz-cass/**</exclude> -->
112                                           <!-- <exclude>**/JU_UseCase1.java</exclude> -->
113                                           <exclude>**/JU_RoleDAO.java</exclude>
114                                           <exclude>**/JU_PermDAO.java</exclude>
115                                            <exclude>**/JU_Question.java</exclude> 
116                                           <!-- <exclude>**/JU_NS.java</exclude> -->
117                                           <exclude>**/JU_HistoryDAO.java</exclude>                                
118                                           <exclude>**/JU_DelegateDAO.java</exclude>
119                                           <exclude>**/JU_CredDAO.java</exclude>
120                                           <exclude>**/JU_CacheInfoDAO.java</exclude>
121                                           <exclude>**/JU_ApprovalDAO.java</exclude>
122                                         <!--  <exclude>**/JU_Define.java</exclude>  -->
123                                         <exclude>**/JU_Identities.java</exclude>
124                                           <exclude>**/JU_AuthzTransFilter.java</exclude>
125                                           <exclude>**/JU_CachingFileAccess.java</exclude>
126                                           <!-- <exclude>**/AbsServiceTest.java</exclude> -->
127                                           <exclude>**/JU_DefaultOrg.java</exclude>
128                                           <exclude>**/JU_FileServer.java</exclude>
129                                           <exclude>**/JU_DirectAAFLur.java</exclude>
130                                           <exclude>**/JU_AuthAPI.java</exclude>
131                                           <exclude>**/JU_GwAPI.java</exclude>  
132                                           
133                                           <!-- <exclude>**/JU_Perm_2_0*.java</exclude> -->
134                                           <!-- <exclude>**/JU_Role_2_0*.java</exclude>                             -->
135                         
136                                         </excludes>
137         
138                                   </configuration>
139                                 </plugin>
140         
141                                 <plugin>
142                                         <groupId>org.codehaus.mojo</groupId>
143                                         <artifactId>jaxb2-maven-plugin</artifactId>
144                                         <version>1.3</version>
145                                         <executions>
146                                                 <execution>
147                                                         <phase>generate-sources</phase>
148                                                         <goals>
149                                                                 <goal>xjc</goal>
150                                                         </goals>
151                                                 </execution>
152                                         </executions>
153                                         <configuration>
154                                                 <schemaDirectory>src/main/xsd</schemaDirectory>
155                                         </configuration>
156                                 </plugin>
157         
158                                 <plugin>
159                                   <groupId>org.apache.maven.plugins</groupId>
160                                   <artifactId>maven-failsafe-plugin</artifactId>
161                                   <version>2.17</version>
162                                   <configuration>
163                                                 <skipTests>true</skipTests>
164                                   </configuration>
165                                   <executions>
166                                         <execution>
167                                           <id>integration-test</id>
168                                           <goals>
169                                                 <goal>integration-test</goal>
170                                                 <goal>verify</goal>
171                                           </goals>
172                                         </execution>
173                                   </executions>
174                                 </plugin>
175                                 <plugin>
176                                         <groupId>org.apache.maven.plugins</groupId>
177                                         <artifactId>maven-jarsigner-plugin</artifactId>
178                                         <version>1.2</version>
179                                         <executions>
180                                                 <execution>
181                                                         <id>sign</id>
182                                                         <goals>
183                                                                 <goal>sign</goal>
184                                                         </goals>
185                                                         <configuration>
186                                                                 <!--  skip>${skipSigning}</skip -->
187                                                                 <archive>target/${project.artifactId}-${project.version}.jar</archive>
188                                                         </configuration>
189                                                 </execution>
190                                                 <execution>
191                                                         <id>verify</id>
192                                                         <goals>
193                                                                 <goal>verify</goal>
194                                                         </goals>
195                                                         <configuration>
196                                                                 <archive>target/${project.artifactId}-${project.version}.jar</archive>
197                                                         </configuration>
198                                                 </execution>
199                                         </executions>
200                                         <configuration>
201                                                 <skip>true</skip>
202                                                 <alias>aaf</alias>
203                                                 <keystore>/Volumes/Data/src/cadi/keys/aaf_cadi.jks</keystore>
204                                                 <storepass>Surprise!</storepass>
205                                                 <keypass>Surprise!</keypass>
206                                                 <verbose>true</verbose>
207                                                 <certs>true</certs>
208                                         </configuration>
209                                 </plugin>
210                                 
211                 <plugin>
212                         <groupId>org.apache.maven.plugins</groupId>
213                         <artifactId>maven-javadoc-plugin</artifactId>
214                         <version>2.10.4</version>
215                         <configuration>
216                         <failOnError>false</failOnError>
217                         </configuration>
218                         <executions>
219                                 <execution>
220                                         <id>attach-javadocs</id>
221                                         <goals>
222                                                 <goal>jar</goal>
223                                         </goals>
224                                 </execution>
225                         </executions>
226                 </plugin> 
227
228
229            
230                <plugin>
231                       <groupId>org.apache.maven.plugins</groupId>
232                       <artifactId>maven-source-plugin</artifactId>
233                       <version>2.2.1</version>
234                       <executions>
235                         <execution>
236                           <id>attach-sources</id>
237                           <goals>
238                             <goal>jar-no-fork</goal>
239                           </goals>
240                         </execution>
241                       </executions>
242                     </plugin>
243
244                         
245                 <plugin>
246                                 <groupId>org.codehaus.mojo</groupId>
247                                 <artifactId>cobertura-maven-plugin</artifactId>
248                                 <version>2.7</version>
249                                 <configuration>
250                                         <formats>
251                                         <format>html</format>
252                                         <format>xml</format>
253                                   </formats>
254                                 </configuration>
255                         </plugin>
256                 <plugin>
257                                 <groupId>org.sonatype.plugins</groupId>
258                                 <artifactId>nexus-staging-maven-plugin</artifactId>
259                                 <version>1.6.7</version>
260                                 <extensions>true</extensions>
261                                 <configuration>
262                                         <nexusUrl>${nexusproxy}</nexusUrl>
263                                         <stagingProfileId>176c31dfe190a</stagingProfileId>
264                                         <serverId>ecomp-staging</serverId>
265                                 </configuration>
266                         </plugin>               
267                 <plugin>
268           <groupId>org.jacoco</groupId>
269           <artifactId>jacoco-maven-plugin</artifactId>
270           <version>${jacoco.version}</version>
271           <configuration>
272             <excludes>
273               <exclude>**/gen/**</exclude>
274               <exclude>**/generated-sources/**</exclude>
275               <exclude>**/yang-gen/**</exclude>
276               <exclude>**/pax/**</exclude>
277             </excludes>
278           </configuration>
279           <executions>
280
281             <execution>
282               <id>pre-unit-test</id>
283               <goals>
284                 <goal>prepare-agent</goal>
285               </goals>
286               <configuration>
287                 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
288                 <propertyName>surefireArgLine</propertyName>
289               </configuration>
290             </execution>
291             
292        
293             <execution>
294               <id>post-unit-test</id>
295               <phase>test</phase>
296               <goals>
297                 <goal>report</goal>
298               </goals>
299               <configuration>
300                 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
301                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
302               </configuration>
303             </execution>
304             <execution>
305               <id>pre-integration-test</id>
306               <phase>pre-integration-test</phase>
307               <goals>
308                 <goal>prepare-agent</goal>
309               </goals>
310               <configuration>
311                 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
312
313                 <propertyName>failsafeArgLine</propertyName>
314               </configuration>
315             </execution>
316
317        
318             <execution>
319               <id>post-integration-test</id>
320               <phase>post-integration-test</phase>
321               <goals>
322                 <goal>report</goal>
323               </goals>
324               <configuration>
325                 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
326                 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
327               </configuration>
328             </execution>
329           </executions>
330         </plugin>       
331                                 
332                 </plugins>
333                 </pluginManagement>                     
334     </build>    
335         
336         <dependencies> 
337                 <dependency>
338                         <groupId>junit</groupId>
339                         <artifactId>junit</artifactId>
340                         <version>4.10</version>
341                         <scope>test</scope>
342                 </dependency>
343
344                 <dependency>
345                     <groupId>org.mockito</groupId>
346                     <artifactId>mockito-core</artifactId>
347                     <version>1.10.19</version>
348                     <scope>test</scope>
349                 </dependency>
350                 <dependency>
351                     <groupId>org.powermock</groupId>
352                     <artifactId>powermock-module-junit4</artifactId>
353                     <version>1.6.4</version>
354                     <scope>test</scope>
355                 </dependency>
356                 <dependency>
357                     <groupId>org.powermock</groupId>
358                     <artifactId>powermock-api-mockito</artifactId>
359                     <version>1.6.4</version>
360                     <scope>test</scope>
361                 </dependency> 
362
363          
364         </dependencies>         
365
366         <modules>
367                 <!-- 
368                    <module> auth-client</module>
369                    complile manually with mvn -N independently
370                 -->
371                 <module>authz-client</module>
372                 <module>authz-core</module>
373                 <module>authz-cass</module>
374                 <module>authz-defOrg</module>
375                 <module>authz-cmd</module>
376                 <!--  <module>authz-batch</module>-->
377                 <module>authz-test</module>
378                 <!--  <module>authz-gui</module> -->
379                 <module>authz-gw</module>
380                 <module>authz-certman</module>
381                 <module>authz-fs</module>
382                 <module>authz-service</module>
383         </modules>
384         
385         <dependencyManagement>
386                 <dependencies>
387                         <dependency>
388                                 <groupId>org.onap.aaf.inno</groupId>
389                                 <artifactId>env</artifactId>
390                                 <version>${project.innoVersion}</version>
391                         </dependency>
392
393                         <dependency>
394                                 <groupId>org.onap.aaf.inno</groupId>
395                                 <artifactId>log4j</artifactId>
396                                 <version>${project.innoVersion}</version>
397                         </dependency>
398
399                         <dependency>
400                                 <groupId>org.onap.aaf.inno</groupId>
401                                 <artifactId>rosetta</artifactId>
402                                 <version>${project.innoVersion}</version>
403                         </dependency>
404
405                         <dependency>
406                                 <groupId>org.onap.aaf.inno</groupId>
407                                 <artifactId>xgen</artifactId>
408                                 <version>${project.innoVersion}</version>
409                         </dependency>
410                         
411                         <dependency>
412                                 <groupId>org.onap.aaf.cadi</groupId>
413                                 <artifactId>cadi-core</artifactId>
414                                 <version>${project.cadiVersion}</version>
415                         </dependency>
416
417                         <dependency>
418                                 <groupId>org.onap.aaf.cadi</groupId>
419                                 <artifactId>cadi-client</artifactId>
420                                 <version>${project.cadiVersion}</version>
421                         </dependency>
422                         
423                         
424                         <dependency>
425                                 <groupId>org.onap.aaf.cadi</groupId>
426                                 <artifactId>cadi-aaf</artifactId>
427                                 <version>${project.cadiVersion}</version>
428                                 <exclusions>
429                               <exclusion> 
430                                         <groupId>org.apache.cassandra</groupId>
431                                 <artifactId>cassandra-all</artifactId>
432                       </exclusion>
433                             </exclusions> 
434                         </dependency>
435                         
436                         <dependency>
437                                 <groupId>org.onap.aaf.authz</groupId>
438                                 <artifactId>authz-client</artifactId>
439                                 <version>${project.interfaceVersion}</version>
440                         </dependency>
441                         
442                         
443                         <dependency>
444                                 <groupId>org.onap.aaf.authz</groupId>
445                                 <artifactId>authz-core</artifactId>
446                                 <version>${project.version}</version>
447                         </dependency>
448                         
449                         <dependency>
450                     <groupId>org.onap.aaf.authz</groupId>
451                     <artifactId>authz-cass</artifactId>
452                                 <version>${project.version}</version>
453                 </dependency>
454                 
455                 <dependency>
456                                 <groupId>org.onap.aaf.authz</groupId>
457                                 <artifactId>authz-batch</artifactId>
458                                 <version>${project.interfaceVersion}</version>
459                         </dependency>
460             
461
462
463                     <dependency>
464                     <groupId>org.onap.aaf.authz</groupId>
465                     <artifactId>authz-cmd</artifactId>
466                                 <version>${project.version}</version>
467                 </dependency>
468                 <dependency>
469                     <groupId>org.onap.aaf.authz</groupId>
470                     <artifactId>authz-gw</artifactId>
471                                 <version>${project.version}</version>
472                 </dependency>
473
474                         <dependency>
475                                 <groupId>com.att.aft</groupId>
476                                 <artifactId>dme2</artifactId>
477                                 <version>${project.dme2Version}</version>
478                         </dependency>
479                 
480                         <dependency>
481                           <groupId>javax.servlet</groupId>
482                           <artifactId>servlet-api</artifactId>
483                           <version>2.5</version>
484                         </dependency>
485                         
486                         <dependency>
487                                 <groupId>org.eclipse.jetty</groupId>
488                                 <artifactId>jetty-servlet</artifactId>
489                                 <version>9.0.3.v20130506</version>
490                         </dependency>
491                         
492                         <dependency>
493                                 <groupId>com.datastax.cassandra</groupId>
494                                 <artifactId>cassandra-all</artifactId>
495                                 <version>2.1.10</version>
496                                 <exclusions>
497                               <exclusion> 
498                                 <groupId>org.slf4j</groupId>
499                                 <artifactId>slf4j-log4j12</artifactId>
500                               </exclusion>
501                               <exclusion> 
502                                 <groupId>log4j</groupId>
503                                 <artifactId>log4j</artifactId>
504                               </exclusion>
505                             </exclusions> 
506                         </dependency>
507                         <dependency>
508                                 <groupId>com.datastax.cassandra</groupId>
509                                 <artifactId>cassandra-driver-core</artifactId>
510                                 <!-- version>1.0.3</version -->
511                                 <!-- version>1.0.5</version -->
512                                 <version>2.1.10</version>
513                                 <exclusions>
514                               <exclusion> 
515                                 <groupId>org.slf4j</groupId>
516                                 <artifactId>slf4j-log4j12</artifactId>
517                               </exclusion>
518                               <exclusion> 
519                                 <groupId>log4j</groupId>
520                                 <artifactId>log4j</artifactId>
521                               </exclusion>
522                             </exclusions> 
523                         </dependency>   
524
525                         <dependency>
526                                 <groupId>org.slf4j</groupId>
527                                 <artifactId>slf4j-log4j12</artifactId>
528                                 <version>1.7.5</version>
529                         </dependency>
530
531                         <dependency>
532                         <groupId>javax.mail</groupId>
533                         <artifactId>mail</artifactId>
534                         <version>1.4.5</version>
535                 </dependency> 
536
537                         
538                 </dependencies>
539         </dependencyManagement>
540         <distributionManagement>
541                 <repository>
542                         <id>ecomp-releases</id>
543                         <name>AAF Release Repository</name>
544                         <url>${nexusproxy}${releaseNexusPath}</url>
545                 </repository>
546                 <snapshotRepository>
547                         <id>ecomp-snapshots</id>
548                         <name>AAF Snapshot Repository</name>
549                         <url>${nexusproxy}${snapshotNexusPath}</url>
550                 </snapshotRepository>
551                 <site>
552                         <id>ecomp-site</id>
553                         <url>dav:${nexusproxy}${sitePath}</url>
554                 </site>
555         </distributionManagement>
556
557 </project>