Add an unit test for the bug with children
[aai/resources.git] / aai-resources / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4     ============LICENSE_START=======================================================
5     org.onap.aai
6     ================================================================================
7     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
8     ================================================================================
9     Licensed under the Apache License, Version 2.0 (the "License");
10     you may not use this file except in compliance with the License.
11     You may obtain a copy of the License at
12
13        http://www.apache.org/licenses/LICENSE-2.0
14
15     Unless required by applicable law or agreed to in writing, software
16     distributed under the License is distributed on an "AS IS" BASIS,
17     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18     See the License for the specific language governing permissions and
19     limitations under the License.
20     ============LICENSE_END=========================================================
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     <modelVersion>4.0.0</modelVersion>
26     <groupId>org.onap.aai.resources</groupId>
27     <artifactId>aai-resources</artifactId>
28     <parent>
29         <groupId>org.onap.aai.resources</groupId>
30         <artifactId>resources</artifactId>
31         <version>1.6.4-SNAPSHOT</version>
32     </parent>
33     <properties>
34         <java.version>1.8</java.version>
35         <start-class>org.onap.aai.ResourcesApp</start-class>
36
37     
38         <!-- Start of the jacoco plugin properties -->
39         <sonar.language>java</sonar.language>
40         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
41         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
42         <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
43         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
44         <sonar.projectVersion>${project.version}</sonar.projectVersion>
45         <!-- End of the jacoco plugin properties -->
46
47         <!-- 
48                 inherit from parent 
49                 <docker.fabric.version>0.28.0</docker.fabric.version>
50         -->
51         <!-- Default docker registry that maven fabric plugin will try to pull from -->
52         <docker.registry>docker.io</docker.registry>
53         <!-- Specifying the docker push registry where the image should be pushed -->
54         <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
55         <docker.push.registry>localhost:5000</docker.push.registry>
56         <aai.docker.version>1.0.0</aai.docker.version>
57         <aai.base.image>alpine</aai.base.image>
58         <aai.base.image.version>1.6.0</aai.base.image.version>
59
60         <!--
61              Location where assembly of our scripts, resources and main jar will be held
62                  Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
63         -->
64         <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
65         </aai.build.directory>
66         <aai.docker.namespace>onap</aai.docker.namespace>
67
68         <maven.skip.tests>true</maven.skip.tests>
69         <snapshot.file>${project.basedir}/snapshots/snapshot.graphson</snapshot.file>
70
71         <jacoco.line.coverage.limit>0.68</jacoco.line.coverage.limit>
72         <license.goal.type>check</license.goal.type>
73
74         <!-- This will be used for the docker images as the default format of maven build has issues -->
75         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
76
77         <!-- Start of Default ONAP Schema Properties -->
78         <schema.source.name>onap</schema.source.name>
79         <schema.configuration.location>N/A</schema.configuration.location>
80         <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm</schema.nodes.location>
81         <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules</schema.edges.location>
82         <schema.version.depth.start>v10</schema.version.depth.start>
83         <schema.version.related.link.start>v10</schema.version.related.link.start>
84         <schema.version.app.root.start>v11</schema.version.app.root.start>
85         <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
86         <schema.version.edge.label.start>v12</schema.version.edge.label.start>
87         <schema.version.api.default>v19</schema.version.api.default>
88         <schema.version.list>v10,v11,v12,v13,v14,v15,v16,v17,v18,v19</schema.version.list>
89         <schema.uri.base.path>/aai</schema.uri.base.path>
90         <!-- <schema.translator.list>config</schema.translator.list> -->
91         <schema.ingest.file>${project.basedir}/src/main/resources/application.properties</schema.ingest.file>
92
93         <!-- End of Default ONAP Schema Properties -->
94
95         <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
96     </properties>
97     <profiles>
98         <!-- Docker profile to be used for building docker image and pushing to nexus -->
99         <profile>
100             <id>docker</id>
101             <build>
102                 <plugins>
103                     <plugin>
104                         <groupId>org.codehaus.groovy.maven</groupId>
105                         <artifactId>gmaven-plugin</artifactId>
106                         <version>1.0</version>
107                         <executions>
108                             <execution>
109                                 <phase>pre-clean</phase>
110                             </execution>
111                             <execution>
112                                 <id>parse-base</id>
113                                 <phase>prepare-package</phase>
114                                 <goals>
115                                     <goal>execute</goal>
116                                 </goals>
117                                 <configuration>
118                                     <source>
119                                         def userAaiBaseImage = session.userProperties['aai.base.image']
120                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version']
121                                         if (userAaiCommonVersion != null) {
122                                             project.properties['aai.base.image.version'] = userAaiCommonVersion
123                                         }
124                                         if (userAaiBaseImage != null) {
125                                             project.properties['aai.base.image'] = userAaiBaseImage
126                                         }
127                                         log.info 'Base image flavour: ' + project.properties['aai.base.image']
128                                         log.info 'Base image version: ' + project.properties['aai.base.image.version']
129                                     </source>
130                                 </configuration>
131                             </execution>
132                         </executions>
133                     </plugin>
134                     <plugin>
135                         <groupId>io.fabric8</groupId>
136                         <artifactId>docker-maven-plugin</artifactId>
137                         <configuration>
138                             <verbose>true</verbose>
139                             <apiVersion>1.23</apiVersion>
140                             <images>
141                                 <image>
142                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
143                                     </name>
144                                     <build>
145                                         <filter>@</filter>
146                                         <tags>
147                                             <tag>latest</tag>
148                                             <tag>${project.docker.latesttag.version}</tag>
149                                             <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
150                                         </tags>
151                                         <cleanup>try</cleanup>
152                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
153                                         <assembly>
154                                             <inline>
155                                                 <fileSets>
156                                                     <fileSet>
157                                                         <directory>${aai.build.directory}</directory>
158                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
159                                                     </fileSet>
160                                                 </fileSets>
161                                             </inline>
162                                         </assembly>
163                                     </build>
164                                 </image>
165                             </images>
166                         </configuration>
167                         <executions>
168                             <execution>
169                                 <id>clean-images</id>
170                                 <phase>pre-clean</phase>
171                                 <goals>
172                                     <goal>remove</goal>
173                                 </goals>
174                                 <configuration>
175                                     <removeAll>true</removeAll>
176                                 </configuration>
177                             </execution>
178                             <execution>
179                                 <id>generate-images</id>
180                                 <phase>package</phase>
181                                 <goals>
182                                     <goal>build</goal>
183                                 </goals>
184                             </execution>
185                             <execution>
186                                 <id>push-images</id>
187                                 <phase>deploy</phase>
188                                 <goals>
189                                     <goal>push</goal>
190                                 </goals>
191                             </execution>
192                         </executions>
193                     </plugin>
194                 </plugins>
195             </build>
196         </profile>
197         <!-- Start of ONAP Profile -->
198         <profile>
199             <id>onap</id>
200             <properties>
201                 <schema.source.name>onap</schema.source.name>
202                 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
203                 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
204                 <schema.ingest.file>${project.basedir}/src/main/resources/application.properties</schema.ingest.file>
205             </properties>
206         </profile>
207         <!-- End of ONAP Profile -->
208         <profile>
209             <id>runAjsc</id>
210             <properties>
211                 <skipTests>${maven.skip.tests}</skipTests>
212             </properties>
213             <build>
214                 <defaultGoal>pre-integration-test</defaultGoal>
215                 <plugins>
216                     <plugin>
217                         <groupId>org.codehaus.mojo</groupId>
218                         <artifactId>exec-maven-plugin</artifactId>
219                         <version>1.6.0</version>
220                         <executions>
221                             <execution>
222                                 <id>run-spring-boot</id>
223                                 <phase>package</phase>
224                                 <goals>
225                                     <goal>java</goal>
226                                 </goals>
227                             </execution>
228                         </executions>
229                         <configuration>
230                             <mainClass>${start-class}</mainClass>
231                             <systemProperties>
232                                 <property>
233                                     <key>snapshot.location</key>
234                                     <value>${snapshot.file}</value>
235                                 </property>
236                                 <property>
237                                     <key>schema.source.name</key>
238                                     <value>${schema.source.name}</value>
239                                 </property>
240                                 <property>
241                                     <key>schema.configuration.location</key>
242                                     <value>${schema.configuration.location}</value>
243                                 </property>
244                                 <property>
245                                     <key>schema.nodes.location</key>
246                                     <value>${schema.nodes.location}</value>
247                                 </property>
248                                 <property>
249                                     <key>schema.edges.location</key>
250                                     <value>${schema.edges.location}</value>
251                                 </property>
252                                 <property>
253                                     <key>schema.version.depth.start</key>
254                                     <value>${schema.version.depth.start}</value>
255                                 </property>
256                                 <property>
257                                     <key>schema.version.related.link.start</key>
258                                     <value>${schema.version.related.link.start}</value>
259                                 </property>
260                                 <property>
261                                     <key>schema.version.app.root.start</key>
262                                     <value>${schema.version.app.root.start}</value>
263                                 </property>
264                                 <property>
265                                     <key>schema.version.namespace.change.start</key>
266                                     <value>${schema.version.namespace.change.start}</value>
267                                 </property>
268                                 <property>
269                                     <key>schema.version.edge.label.start</key>
270                                     <value>${schema.version.edge.label.start}</value>
271                                 </property>
272                                 <property>
273                                     <key>schema.version.api.default</key>
274                                     <value>${schema.version.api.default}</value>
275                                 </property>
276                                 <property>
277                                     <key>schema.version.list</key>
278                                     <value>${schema.version.list}</value>
279                                 </property>
280                                 <property>
281                                     <key>schema.uri.base.path</key>
282                                     <value>${schema.uri.base.path}</value>
283                                 </property>
284                                 <property>
285                                     <key>schema.ingest.file</key>
286                                     <value>${schema.ingest.file}</value>
287                                 </property>
288                             </systemProperties>
289                             <executable>java</executable>
290                         </configuration>
291                     </plugin>
292                 </plugins>
293             </build>
294         </profile>
295     </profiles>
296
297     <dependencies>
298         <dependency>
299             <groupId>net.sf.jopt-simple</groupId>
300             <artifactId>jopt-simple</artifactId>
301         </dependency>
302         <dependency>
303             <groupId>io.swagger</groupId>
304             <artifactId>swagger-core</artifactId>
305             <exclusions>
306                 <exclusion>
307                     <groupId>javax.ws.rs</groupId>
308                     <artifactId>jsr311-api</artifactId>
309                 </exclusion>
310             </exclusions>
311         </dependency>
312         <dependency>
313             <groupId>io.swagger</groupId>
314             <artifactId>swagger-annotations</artifactId>
315         </dependency>
316         <dependency>
317             <groupId>commons-configuration</groupId>
318             <artifactId>commons-configuration</artifactId>
319             <exclusions>
320                 <exclusion>
321                     <artifactId>commons-lang</artifactId>
322                     <groupId>commons-lang</groupId>
323                 </exclusion>
324             </exclusions>
325         </dependency>
326         <dependency>
327             <groupId>io.swagger</groupId>
328             <artifactId>swagger-jersey-jaxrs</artifactId>
329             <exclusions>
330                 <exclusion>
331                     <groupId>org.glassfish.jersey.media</groupId>
332                     <artifactId>jersey-media-multipart</artifactId>
333                 </exclusion>
334                 <exclusion>
335                     <artifactId>jersey-core</artifactId>
336                     <groupId>com.sun.jersey</groupId>
337                 </exclusion>
338                 <exclusion>
339                     <artifactId>jersey-json</artifactId>
340                     <groupId>com.sun.jersey</groupId>
341                 </exclusion>
342                 <exclusion>
343                     <artifactId>jersey-server</artifactId>
344                     <groupId>com.sun.jersey</groupId>
345                 </exclusion>
346                 <exclusion>
347                     <artifactId>jersey-client</artifactId>
348                     <groupId>com.sun.jersey</groupId>
349                 </exclusion>
350                 <exclusion>
351                     <artifactId>jsr311-api</artifactId>
352                     <groupId>javax.ws.rs</groupId>
353                 </exclusion>
354                 <exclusion>
355                     <artifactId>jersey-multipart</artifactId>
356                     <groupId>com.sun.jersey.contribs</groupId>
357                 </exclusion>
358             </exclusions>
359         </dependency>
360         <dependency>
361             <groupId>commons-lang</groupId>
362             <artifactId>commons-lang</artifactId>
363         </dependency>
364         <!-- eelf dependency -->
365         <dependency>
366             <groupId>com.att.eelf</groupId>
367             <artifactId>eelf-core</artifactId>
368         </dependency>
369         <dependency>
370             <groupId>ch.qos.logback</groupId>
371             <artifactId>logback-core</artifactId>
372         </dependency>
373         <dependency>
374             <groupId>ch.qos.logback</groupId>
375             <artifactId>logback-classic</artifactId>
376         </dependency>
377         <dependency>
378             <groupId>ch.qos.logback</groupId>
379             <artifactId>logback-access</artifactId>
380         </dependency>
381         <dependency>
382             <groupId>org.hamcrest</groupId>
383             <artifactId>hamcrest-junit</artifactId>
384         </dependency>
385         <dependency>
386             <groupId>junit</groupId>
387             <artifactId>junit</artifactId>
388             <scope>test</scope>
389         </dependency>
390         <dependency>
391             <groupId>com.google.guava</groupId>
392             <artifactId>guava</artifactId>
393         </dependency>
394         <dependency>
395             <groupId>org.janusgraph</groupId>
396             <artifactId>janusgraph-core</artifactId>
397             <exclusions>
398                 <exclusion>
399                     <groupId>org.slf4j</groupId>
400                     <artifactId>slf4j-log4j12</artifactId>
401                 </exclusion>
402                 <exclusion>
403                     <groupId>dom4j</groupId>
404                     <artifactId>dom4j</artifactId>
405                 </exclusion>
406             </exclusions>
407         </dependency>
408         <dependency>
409             <groupId>org.janusgraph</groupId>
410             <artifactId>janusgraph-cassandra</artifactId>
411             <exclusions>
412                 <exclusion>
413                     <groupId>org.slf4j</groupId>
414                     <artifactId>slf4j-log4j12</artifactId>
415                 </exclusion>
416                 <exclusion>
417                     <groupId>dom4j</groupId>
418                     <artifactId>dom4j</artifactId>
419                 </exclusion>
420             </exclusions>
421         </dependency>
422         <!--
423             indirect janusgraph-cassandra dependency
424             need to be newer than default one
425             in order to support multiple cpu archs
426         -->
427         <dependency>
428             <groupId>com.github.jnr</groupId>
429             <artifactId>jnr-ffi</artifactId>
430         </dependency>
431
432         <dependency>
433             <groupId>org.janusgraph</groupId>
434             <artifactId>janusgraph-cql</artifactId>
435             <exclusions>
436                 <exclusion>
437                     <groupId>org.slf4j</groupId>
438                     <artifactId>slf4j-log4j12</artifactId>
439                 </exclusion>
440             </exclusions>
441         </dependency>
442
443         <dependency>
444             <groupId>com.fasterxml.jackson.jaxrs</groupId>
445             <artifactId>jackson-jaxrs-json-provider</artifactId>
446         </dependency>
447         <dependency>
448             <groupId>org.mockito</groupId>
449             <artifactId>mockito-all</artifactId>
450             <scope>test</scope>
451         </dependency>
452         <dependency>
453             <groupId>org.powermock</groupId>
454             <artifactId>powermock-module-junit4</artifactId>
455         </dependency>
456         <dependency>
457             <groupId>org.powermock</groupId>
458             <artifactId>powermock-api-mockito</artifactId>
459             <scope>test</scope>
460         </dependency>
461         <dependency>
462             <groupId>com.beust</groupId>
463             <artifactId>jcommander</artifactId>
464         </dependency>
465         <dependency>
466             <groupId>org.json</groupId>
467             <artifactId>json</artifactId>
468         </dependency>
469         <dependency>
470             <groupId>org.freemarker</groupId>
471             <artifactId>freemarker</artifactId>
472         </dependency>
473         <dependency>
474             <groupId>javax.xml.bind</groupId>
475             <artifactId>jaxb-api</artifactId>
476         </dependency>
477         <dependency>
478             <groupId>org.onap.aaf.authz</groupId>
479             <artifactId>aaf-cadi-aaf</artifactId>
480         </dependency>
481         <dependency>
482             <groupId>org.eclipse.persistence</groupId>
483             <artifactId>eclipselink</artifactId>
484         </dependency>
485         <dependency>
486             <groupId>org.eclipse.persistence</groupId>
487             <artifactId>org.eclipse.persistence.moxy</artifactId>
488             <scope>compile</scope>
489         </dependency>
490         <dependency>
491             <groupId>com.github.fge</groupId>
492             <artifactId>json-patch</artifactId>
493         </dependency>
494         <dependency>
495             <groupId>org.javatuples</groupId>
496             <artifactId>javatuples</artifactId>
497             <scope>compile</scope>
498         </dependency>
499         <dependency>
500             <groupId>com.google.code.gson</groupId>
501             <artifactId>gson</artifactId>
502         </dependency>
503         <dependency>
504             <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
505             <artifactId>dmaapClient</artifactId>
506             <exclusions>
507                 <exclusion>
508                     <groupId>org.slf4j</groupId>
509                     <artifactId>slf4j-log4j12</artifactId>
510                 </exclusion>
511                 <exclusion>
512                     <groupId>com.att.aft</groupId>
513                     <artifactId>dme2</artifactId>
514                 </exclusion>
515             </exclusions>
516         </dependency>
517         <dependency>
518             <groupId>com.jayway.jsonpath</groupId>
519             <artifactId>json-path</artifactId>
520         </dependency>
521         <!-- Do not use activemq-all because they force you to use a specific logging
522             and they shade it so you can't simply exclude it and when you deploy the
523             jar, you will notice failure -->
524         <dependency>
525             <groupId>org.apache.activemq</groupId>
526             <artifactId>activemq-broker</artifactId>
527         </dependency>
528         <dependency>
529             <groupId>org.apache.activemq</groupId>
530             <artifactId>activemq-client</artifactId>
531         </dependency>
532         <dependency>
533             <groupId>org.onap.aai.aai-common</groupId>
534             <artifactId>aai-core</artifactId>
535             <exclusions>
536                 <exclusion>
537                     <groupId>com.sun.jersey</groupId>
538                     <artifactId>jersey-core</artifactId>
539                 </exclusion>
540                 <exclusion>
541                     <groupId>org.codehaus.jackson</groupId>
542                     <artifactId>jackson-mapper-asl</artifactId>
543                 </exclusion>
544                 <exclusion>
545                     <groupId>org.eclipse.jetty</groupId>
546                     <artifactId>jetty-http</artifactId>
547                 </exclusion>
548                 <exclusion>
549                     <groupId>org.eclipse.jetty</groupId>
550                     <artifactId>jetty-server</artifactId>
551                 </exclusion>
552                 <exclusion>
553                     <groupId>org.springframework</groupId>
554                     <artifactId>spring-web</artifactId>
555                 </exclusion>
556             </exclusions>
557         </dependency>
558         <dependency>
559             <groupId>org.onap.aai.aai-common</groupId>
560             <artifactId>aai-schema-ingest</artifactId>
561         </dependency>
562
563         <dependency>
564             <groupId>org.springframework</groupId>
565             <artifactId>spring-jms</artifactId>
566             <exclusions>
567                 <exclusion>
568                     <groupId>com.sun.jersey</groupId>
569                     <artifactId>jersey-core</artifactId>
570                 </exclusion>
571             </exclusions>
572         </dependency>
573         <!-- Do not use the jersey-client since jersey client 1.0 version clashes
574             with jersey 2 which we are using -->
575         <!-- Use this to make http requests instead of jersey 1.0 client -->
576         <dependency>
577             <groupId>org.apache.httpcomponents</groupId>
578             <artifactId>httpclient</artifactId>
579         </dependency>
580         <dependency>
581             <groupId>org.skyscreamer</groupId>
582             <artifactId>jsonassert</artifactId>
583             <scope>test</scope>
584         </dependency>
585         <!--
586             Explicitly stating the security spring framework and
587             exclude the bouncy castle since that is somehow overwriting
588             our p12 file decryption that's built into java security
589             This will cause the password is incorrect
590             This needs to be added back if org.bouncy castle dependency
591             sneaks backs in and causing issues with the two way ssl
592         -->
593         <dependency>
594             <groupId>org.springframework.security</groupId>
595             <artifactId>spring-security-rsa</artifactId>
596             <exclusions>
597                 <exclusion>
598                     <groupId>org.bouncycastle</groupId>
599                     <artifactId>bcpkix-jdk15on</artifactId>
600                 </exclusion>
601             </exclusions>
602         </dependency>
603         <dependency>
604             <groupId>io.netty</groupId>
605             <artifactId>netty-handler</artifactId>
606         </dependency>
607         <dependency>
608             <groupId>org.springframework.boot</groupId>
609             <artifactId>spring-boot-starter-web</artifactId>
610             <exclusions>
611                 <exclusion>
612                     <groupId>org.springframework.boot</groupId>
613                     <artifactId>spring-boot-starter-tomcat</artifactId>
614                 </exclusion>
615             </exclusions>
616         </dependency>
617         <dependency>
618             <groupId>org.springframework.boot</groupId>
619             <artifactId>spring-boot-starter-jetty</artifactId>
620         </dependency>
621         <dependency>
622             <groupId>org.springframework.boot</groupId>
623             <artifactId>spring-boot-starter-jersey</artifactId>
624         </dependency>
625         <dependency>
626             <groupId>io.netty</groupId>
627             <artifactId>netty-all</artifactId>
628         </dependency>
629         <dependency>
630             <groupId>org.codehaus.groovy</groupId>
631             <artifactId>groovy</artifactId>
632             <classifier>indy</classifier>
633         </dependency>
634         <dependency>
635             <groupId>org.springframework</groupId>
636             <artifactId>spring-test</artifactId>
637             <scope>test</scope>
638         </dependency>
639         <dependency>
640             <groupId>org.springframework.boot</groupId>
641             <artifactId>spring-boot-test</artifactId>
642             <scope>test</scope>
643         </dependency>
644         <dependency>
645             <groupId>org.apache.tinkerpop</groupId>
646             <artifactId>gremlin-groovy</artifactId>
647         </dependency>
648     </dependencies>
649     <build>
650         <resources>
651             <resource>
652                 <directory>${project.basedir}/src/main/swm</directory>
653                 <targetPath>${project.build.directory}/swm</targetPath>
654                 <filtering>false</filtering>
655             </resource>
656             <resource>
657                 <directory>${project.basedir}/src/main/resources</directory>
658                 <includes>
659                     <include>application.properties</include>
660                     <include>dme2.properties</include>
661                     <include>logback.xml</include>
662                     <include>localhost-access-logback.xml</include>
663                 </includes>
664                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
665                 <filtering>false</filtering>
666             </resource>
667             <resource>
668                 <directory>${project.basedir}/src/main/resources</directory>
669                 <includes>
670                     <include>**/*</include>
671                 </includes>
672                 <filtering>true</filtering>
673             </resource>
674             <resource>
675                 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
676                 <includes>
677                     <include>janusgraph-realtime.properties</include>
678                     <include>janusgraph-cached.properties</include>
679                     <include>aaiconfig.properties</include>
680                 </includes>
681                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
682                 <filtering>false</filtering>
683             </resource>
684             <resource>
685                 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
686                 <includes>
687                     <include>aai-client-cert.p12</include>
688                     <include>tomcat_keystore</include>
689                     <include>aai_policy.json</include>
690                 </includes>
691                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
692                 <filtering>true</filtering>
693             </resource>
694             <resource>
695                 <directory>${project.basedir}/src/main/resources/</directory>
696                 <includes>
697                     <include>logback.xml</include>
698                     <include>localhost-access-logback.xml</include>
699                     <include>hbase-site.xml</include>
700                 </includes>
701                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
702                 <filtering>true</filtering>
703             </resource>
704             <resource>
705                 <directory>${project.basedir}/src/main/resources/schema/</directory>
706                 <includes>
707                     <include>**/oxm/**/*.xml</include>
708                     <include>**/dbedgerules/**/*.json</include>
709                 </includes>
710                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema</targetPath>
711                 <filtering>false</filtering>
712             </resource>
713             <resource>
714                 <directory>${project.basedir}/src/main/docker</directory>
715                 <includes>
716                     <include>**/*</include>
717                 </includes>
718                 <targetPath>${aai.build.directory}</targetPath>
719                 <filtering>true</filtering>
720             </resource>
721             <resource>
722                 <directory>${project.build.directory}/</directory>
723                 <includes>
724                     <include>${project.artifactId}-${project.version}.jar</include>
725                 </includes>
726                 <targetPath>${aai.build.directory}/lib/</targetPath>
727                 <filtering>false</filtering>
728             </resource>
729         </resources>
730         <pluginManagement>
731             <plugins>
732                 <plugin>
733                     <groupId>org.apache.maven.plugins</groupId>
734                     <artifactId>maven-dependency-plugin</artifactId>
735                     <version>2.8</version>
736                     <executions>
737                         <execution>
738                             <id>unpack-schema-dependency</id>
739                             <phase>initialize</phase>
740                             <goals>
741                                 <goal>unpack</goal>
742                             </goals>
743                             <configuration>
744                                 <artifactItems>
745                                     <artifactItem>
746                                         <groupId>org.onap.aai.schema-service</groupId>
747                                         <artifactId>aai-schema</artifactId>
748                                         <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
749                                         <includes>**/oxm/**/*.xml</includes>
750                                     </artifactItem>
751                                 </artifactItems>
752                                 <!-- other configurations here -->
753                             </configuration>
754                         </execution>
755                         <execution>
756                             <id>unpack-edgerules-dependency</id>
757                             <phase>initialize</phase>
758                             <goals>
759                                 <goal>unpack</goal>
760                             </goals>
761                             <configuration>
762                                 <artifactItems>
763                                     <artifactItem>
764                                         <groupId>org.onap.aai.schema-service</groupId>
765                                         <artifactId>aai-schema</artifactId>
766                                         <outputDirectory>${project.basedir}/src/main/resources/schema/</outputDirectory>
767                                         <includes>**/dbedgerules/**/*.json</includes>
768                                     </artifactItem>
769                                 </artifactItems>
770                                 <!-- other configurations here -->
771                             </configuration>
772                         </execution>
773                     </executions>
774                 </plugin>
775                 <plugin>
776                     <groupId>org.codehaus.groovy.maven</groupId>
777                     <artifactId>gmaven-plugin</artifactId>
778                     <version>1.0</version>
779                     <executions>
780                         <execution>
781                             <phase>validate</phase>
782                             <goals>
783                                 <goal>execute</goal>
784                             </goals>
785                             <configuration>
786                                 <source>
787                                     println project.properties['aai.project.version'];
788                                     def versionArray;
789                                     if (project.properties['aai.project.version'] != null) {
790                                         versionArray = project.properties['aai.project.version'].split('\\.');
791                                     }
792
793                                     project.properties["project.major.version"] = versionArray[0];
794                                     project.properties["project.minor.version"] = versionArray[1];
795                                     project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
796                                     println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
797                                 </source>
798                             </configuration>
799                         </execution>
800                     </executions>
801                 </plugin>
802                 <plugin>
803                     <groupId>com.mycila</groupId>
804                     <artifactId>license-maven-plugin</artifactId>
805                     <version>3.0</version>
806                     <configuration>
807                         <header>LICENSE.TXT</header>
808                         <includes>
809                             <include>src/main/java/**</include>
810                             <include>src/test/java/**</include>
811                             <include>pom.xml</include>
812                         </includes>
813                         <skipExistingHeaders>false</skipExistingHeaders>
814                         <skip>false</skip>
815                     </configuration>
816                 </plugin>
817             </plugins>
818         </pluginManagement>
819         <plugins>
820             <plugin>
821                 <groupId>org.springframework.boot</groupId>
822                 <artifactId>spring-boot-maven-plugin</artifactId>
823             </plugin>
824             <plugin>
825                 <groupId>org.apache.maven.plugins</groupId>
826                 <artifactId>maven-clean-plugin</artifactId>
827                 <version>2.4.1</version>
828                 <configuration>
829                     <filesets>
830                         <fileset>
831                             <directory>${project.basedir}/src/main/resources/schema</directory>
832                             <includes>
833                                 <include>**/*</include>
834                             </includes>
835                             <followSymlinks>false</followSymlinks>
836                         </fileset>
837                     </filesets>
838                 </configuration>
839             </plugin>
840             <plugin>
841                 <groupId>org.codehaus.groovy.maven</groupId>
842                 <artifactId>gmaven-plugin</artifactId>
843             </plugin>
844             <plugin>
845                 <groupId>org.apache.maven.plugins</groupId>
846                 <artifactId>maven-dependency-plugin</artifactId>
847                 <version>2.10</version>
848             </plugin>
849             <plugin>
850                 <groupId>org.apache.maven.plugins</groupId>
851                 <artifactId>maven-javadoc-plugin</artifactId>
852             </plugin>
853             <plugin>
854                 <artifactId>maven-assembly-plugin</artifactId>
855                 <configuration>
856                     <descriptors>
857                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
858                     </descriptors>
859                 </configuration>
860                 <executions>
861                     <execution>
862                         <id>make-assembly</id> <!-- this is used for inheritance merges -->
863                         <phase>package</phase> <!-- bind to the packaging phase -->
864                         <goals>
865                             <goal>single</goal>
866                         </goals>
867                     </execution>
868                 </executions>
869             </plugin>
870             <plugin>
871                 <groupId>org.apache.maven.plugins</groupId>
872                 <artifactId>maven-surefire-plugin</artifactId>
873                 <version>2.12.4</version>
874                 <configuration>
875                     <argLine>-noverify ${argLine}</argLine>
876                     <runOrder>alphabetical</runOrder>
877                 </configuration>
878             </plugin>
879             <plugin>
880                 <groupId>com.mycila</groupId>
881                 <artifactId>license-maven-plugin</artifactId>
882             </plugin>
883             <plugin>
884                 <groupId>org.codehaus.mojo</groupId>
885                 <artifactId>sonar-maven-plugin</artifactId>
886                 <version>3.3</version>
887             </plugin>
888             <plugin>
889                 <groupId>org.jacoco</groupId>
890                 <artifactId>jacoco-maven-plugin</artifactId>
891                 <version>0.7.9</version>
892                 <configuration>
893                     <dumpOnExit>true</dumpOnExit>
894                     <excludes>
895                         <exclude>**/**/models/**/*.class</exclude>
896                     </excludes>
897                 </configuration>
898                 <executions>
899                     <execution>
900                         <id>jacoco-initialize-unit-tests</id>
901                         <goals>
902                             <goal>prepare-agent</goal>
903                         </goals>
904                         <configuration>
905                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
906                             <!-- <append>true</append> -->
907                         </configuration>
908                     </execution>
909                     <execution>
910                         <id>post-unit-test</id>
911                         <phase>test</phase>
912                         <goals>
913                             <goal>report</goal>
914                         </goals>
915                         <configuration>
916                             <!-- Sets the path to the file which contains the execution data. -->
917                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
918                             <!-- Sets the output directory for the code coverage report. -->
919                             <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
920                         </configuration>
921                     </execution>
922                     <execution>
923                         <id>default-check</id>
924                         <goals>
925                             <goal>check</goal>
926                         </goals>
927                         <configuration>
928                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
929                             <rules>
930                                 <!--  implementation is needed only for Maven 2  -->
931                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
932                                     <element>BUNDLE</element>
933                                     <limits>
934                                         <limit implementation="org.jacoco.report.check.Limit">
935                                             <counter>LINE</counter>
936                                             <value>COVEREDRATIO</value>
937                                             <minimum>${jacoco.line.coverage.limit}</minimum>
938                                         </limit>
939                                     </limits>
940                                 </rule>
941                             </rules>
942                         </configuration>
943                     </execution>
944                 </executions>
945             </plugin>
946             <plugin>
947                 <groupId>org.apache.maven.plugins</groupId>
948                 <artifactId>maven-deploy-plugin</artifactId>
949             </plugin>
950             <plugin>
951                 <groupId>org.springframework.boot</groupId>
952                 <artifactId>spring-boot-maven-plugin</artifactId>
953                 <configuration>
954                     <mainClass>${start-class}</mainClass>
955                     <layout>ZIP</layout>
956                 </configuration>
957                 <executions>
958                     <execution>
959                         <goals>
960                             <goal>repackage</goal>
961                         </goals>
962                     </execution>
963                 </executions>
964             </plugin>
965         </plugins>
966     </build>
967     <reporting>
968         <plugins>
969             <plugin>
970                 <groupId>org.apache.maven.plugins</groupId>
971                 <artifactId>maven-javadoc-plugin</artifactId>
972                 <version>2.10.4</version>
973                 <configuration>
974                     <failOnError>false</failOnError>
975                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
976                     <docletArtifact>
977                         <groupId>org.umlgraph</groupId>
978                         <artifactId>umlgraph</artifactId>
979                         <version>5.6</version>
980                     </docletArtifact>
981                     <additionalparam>-views</additionalparam>
982                     <useStandardDocletOptions>true</useStandardDocletOptions>
983                 </configuration>
984             </plugin>
985         </plugins>
986     </reporting>
987 </project>