Change to aai-parent
[aai/schema-service.git] / aai-schema-service / 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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     <parent>
27         <groupId>org.onap.aai.schema-service</groupId>
28         <artifactId>schema-service</artifactId>
29         <version>1.6.1-SNAPSHOT</version>
30     </parent>
31     <groupId>org.onap.aai.schema-service</groupId>
32     <artifactId>aai-schema-service</artifactId>
33     <properties>
34         <java.version>1.8</java.version>
35         <start-class>org.onap.aai.schemaservice.SchemaServiceApp</start-class>
36
37         <!-- Start of the jacoco plugin properties -->
38         <sonar.language>java</sonar.language>
39         <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
40         <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
41         <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco.exec</sonar.jacoco.reportPath>
42         <sonar.jacoco.reportMissing.force.zero>false</sonar.jacoco.reportMissing.force.zero>
43         <sonar.projectVersion>${project.version}</sonar.projectVersion>
44         <!-- End of the jacoco plugin properties -->
45
46         <docker.fabric.version>0.28.0</docker.fabric.version>
47         <!-- Default docker registry that maven fabric plugin will try to pull from -->
48         <docker.registry>docker.io</docker.registry>
49         <!-- Specifying the docker push registry where the image should be pushed -->
50         <!-- This value should be overwritten at runtime to wherever need to be pushed to -->
51         <docker.push.registry>localhost:5000</docker.push.registry>
52         <aai.docker.version>1.0.0</aai.docker.version>
53
54         <!--
55              Location where assembly of our scripts, resources and main jar will be held
56                  Check the ${project.artifactId}/src/main/assembly/descriptor.xml for more info
57         -->
58         <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/
59         </aai.build.directory>
60         <aai.docker.namespace>onap</aai.docker.namespace>
61         <aai.base.image>alpine</aai.base.image>
62         <aai.base.image.version>1.6.0</aai.base.image.version>
63
64         <maven.skip.tests>true</maven.skip.tests>
65
66         <jacoco.line.coverage.limit>0.44</jacoco.line.coverage.limit>
67
68         <!-- This will be used for the docker images as the default format of maven build has issues -->
69         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
70         <javadoc.plugin.version>2.10.4</javadoc.plugin.version>
71
72         <!-- Start of Default ONAP Schema Properties -->
73         <schema.source.name>onap</schema.source.name>
74         <schema.configuration.location>N/A</schema.configuration.location>
75         <schema.nodes.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/oxm
76         </schema.nodes.location>
77         <schema.edges.location>${project.basedir}/src/main/resources/schema/${schema.source.name}/dbedgerules
78         </schema.edges.location>
79         <schema.version.depth.start>v10</schema.version.depth.start>
80         <schema.version.related.link.start>v10</schema.version.related.link.start>
81         <schema.version.app.root.start>v11</schema.version.app.root.start>
82         <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
83         <schema.version.edge.label.start>v12</schema.version.edge.label.start>
84         <schema.version.api.default>v16</schema.version.api.default>
85         <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
86         <schema.uri.base.path>/aai/schema-service</schema.uri.base.path>
87         <!-- End of Default ONAP Schema Properties -->
88
89         <!-- Setting some default value to not complain by editor but it will be overridden by gmaven plugin -->
90     </properties>
91     <profiles>
92         <!-- Docker profile to be used for building docker image and pushing to nexus -->
93         <profile>
94             <id>docker</id>
95             <build>
96                 <plugins>
97                     <plugin>
98                         <groupId>org.codehaus.groovy.maven</groupId>
99                         <artifactId>gmaven-plugin</artifactId>
100                         <executions>
101                             <execution>
102                                 <phase>pre-clean</phase>
103                             </execution>
104                             <execution>
105                                 <id>parse-base</id>
106                                 <phase>pre-clean</phase>
107                                 <goals>
108                                     <goal>execute</goal>
109                                 </goals>
110                                 <configuration>
111                                     <source>
112                                         def userAaiBaseImage = session.userProperties['aai.base.image'];
113                                         def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
114                                         if (userAaiCommonVersion != null) {
115                                             project.properties['aai.base.image.version'] = userAaiCommonVersion;
116                                         }
117                                         if (userAaiBaseImage != null) {
118                                             project.properties['aai.base.image'] = userAaiBaseImage;
119                                         }
120                                         log.info 'Base image flavour: ' + project.properties['aai.base.image'];
121                                         log.info 'Base image version: ' + project.properties['aai.base.image.version'];
122                                     </source>
123                                 </configuration>
124                             </execution>
125                         </executions>
126                     </plugin>
127                     <plugin>
128                         <groupId>io.fabric8</groupId>
129                         <artifactId>docker-maven-plugin</artifactId>
130                         <version>${docker.fabric.version}</version>
131                         <configuration>
132                             <verbose>true</verbose>
133                             <apiVersion>1.23</apiVersion>
134                             <images>
135                                 <image>
136                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
137                                     <build>
138                                         <filter>@</filter>
139                                         <tags>
140                                             <tag>latest</tag>
141                                             <tag>${project.docker.latesttag.version}</tag>
142                                             <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
143                                         </tags>
144                                         <cleanup>try</cleanup>
145                                         <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
146                                         <assembly>
147                                             <inline>
148                                                 <fileSets>
149                                                     <fileSet>
150                                                         <directory>${aai.build.directory}</directory>
151                                                         <outputDirectory>/${project.artifactId}</outputDirectory>
152                                                     </fileSet>
153                                                 </fileSets>
154                                             </inline>
155                                         </assembly>
156                                     </build>
157                                 </image>
158                             </images>
159                         </configuration>
160                         <executions>
161                             <execution>
162                                 <id>clean-images</id>
163                                 <phase>pre-clean</phase>
164                                 <goals>
165                                     <goal>remove</goal>
166                                 </goals>
167                                 <configuration>
168                                     <removeAll>true</removeAll>
169                                 </configuration>
170                             </execution>
171                             <execution>
172                                 <id>generate-images</id>
173                                 <phase>package</phase>
174                                 <goals>
175                                     <goal>build</goal>
176                                 </goals>
177                             </execution>
178                             <execution>
179                                 <id>push-images</id>
180                                 <phase>deploy</phase>
181                                 <goals>
182                                     <goal>push</goal>
183                                 </goals>
184                             </execution>
185                         </executions>
186                     </plugin>
187                 </plugins>
188             </build>
189         </profile>
190         <!-- Start of ONAP Profile -->
191         <profile>
192             <id>onap</id>
193             <properties>
194                 <schema.source.name>onap</schema.source.name>
195                 <schema.version.namespace.change.start>v12</schema.version.namespace.change.start>
196                 <schema.version.list>v10,v11,v12,v13,v14,v15,v16</schema.version.list>
197             </properties>
198         </profile>
199         <!-- End of ONAP Profile -->
200         <profile>
201             <id>runAjsc</id>
202             <properties>
203                 <skipTests>${maven.skip.tests}</skipTests>
204             </properties>
205             <build>
206                 <defaultGoal>pre-integration-test</defaultGoal>
207                 <plugins>
208                     <plugin>
209                         <groupId>org.codehaus.mojo</groupId>
210                         <artifactId>exec-maven-plugin</artifactId>
211                         <version>1.6.0</version>
212                         <executions>
213                             <execution>
214                                 <id>run-spring-boot</id>
215                                 <phase>package</phase>
216                                 <goals>
217                                     <goal>java</goal>
218                                 </goals>
219                             </execution>
220                         </executions>
221                         <configuration>
222                             <mainClass>${start-class}</mainClass>
223                             <systemProperties>
224                                 <property>
225                                     <key>schema.source.name</key>
226                                     <value>${schema.source.name}</value>
227                                 </property>
228                                 <property>
229                                     <key>schema.configuration.location</key>
230                                     <value>${schema.configuration.location}</value>
231                                 </property>
232                                 <property>
233                                     <key>schema.nodes.location</key>
234                                     <value>${schema.nodes.location}</value>
235                                 </property>
236                                 <property>
237                                     <key>schema.edges.location</key>
238                                     <value>${schema.edges.location}</value>
239                                 </property>
240                                 <property>
241                                     <key>schema.version.depth.start</key>
242                                     <value>${schema.version.depth.start}</value>
243                                 </property>
244                                 <property>
245                                     <key>schema.version.related.link.start</key>
246                                     <value>${schema.version.related.link.start}</value>
247                                 </property>
248                                 <property>
249                                     <key>schema.version.app.root.start</key>
250                                     <value>${schema.version.app.root.start}</value>
251                                 </property>
252                                 <property>
253                                     <key>schema.version.namespace.change.start</key>
254                                     <value>${schema.version.namespace.change.start}</value>
255                                 </property>
256                                 <property>
257                                     <key>schema.version.edge.label.start</key>
258                                     <value>${schema.version.edge.label.start}</value>
259                                 </property>
260                                 <property>
261                                     <key>schema.version.api.default</key>
262                                     <value>${schema.version.api.default}</value>
263                                 </property>
264                                 <property>
265                                     <key>schema.version.list</key>
266                                     <value>${schema.version.list}</value>
267                                 </property>
268                                 <property>
269                                     <key>schema.uri.base.path</key>
270                                     <value>${schema.uri.base.path}</value>
271                                 </property>
272                             </systemProperties>
273                             <executable>java</executable>
274                         </configuration>
275                     </plugin>
276                 </plugins>
277             </build>
278         </profile>
279     </profiles>
280     <dependencies>
281         <dependency>
282             <groupId>com.att.eelf</groupId>
283             <artifactId>eelf-core</artifactId>
284         </dependency>
285         <dependency>
286             <groupId>ch.qos.logback</groupId>
287             <artifactId>logback-core</artifactId>
288         </dependency>
289         <dependency>
290             <groupId>ch.qos.logback</groupId>
291             <artifactId>logback-classic</artifactId>
292         </dependency>
293         <dependency>
294             <groupId>ch.qos.logback</groupId>
295             <artifactId>logback-access</artifactId>
296         </dependency>
297         <dependency>
298             <groupId>org.onap.aai.aai-common</groupId>
299             <artifactId>aai-core</artifactId>
300             <exclusions>
301                 <exclusion>
302                     <groupId>com.sun.jersey</groupId>
303                     <artifactId>jersey-core</artifactId>
304                 </exclusion>
305                 <exclusion>
306                     <groupId>org.codehaus.jackson</groupId>
307                     <artifactId>jackson-mapper-asl</artifactId>
308                 </exclusion>
309                 <exclusion>
310                     <groupId>org.eclipse.jetty</groupId>
311                     <artifactId>jetty-http</artifactId>
312                 </exclusion>
313                 <exclusion>
314                     <groupId>org.eclipse.jetty</groupId>
315                     <artifactId>jetty-server</artifactId>
316                 </exclusion>
317                 <exclusion>
318                     <groupId>org.springframework</groupId>
319                     <artifactId>spring-web</artifactId>
320                 </exclusion>
321                 <exclusion>
322                     <groupId>org.onap.aai</groupId>
323                     <artifactId>aai-schema-ingest</artifactId>
324                 </exclusion>
325             </exclusions>
326         </dependency>
327         <dependency>
328             <groupId>org.hamcrest</groupId>
329             <artifactId>hamcrest-junit</artifactId>
330         </dependency>
331         <dependency>
332             <groupId>junit</groupId>
333             <artifactId>junit</artifactId>
334             <scope>test</scope>
335         </dependency>
336         <dependency>
337             <groupId>com.google.guava</groupId>
338             <artifactId>guava</artifactId>
339         </dependency>
340         <dependency>
341             <groupId>com.fasterxml.jackson.jaxrs</groupId>
342             <artifactId>jackson-jaxrs-json-provider</artifactId>
343         </dependency>
344         <dependency>
345             <groupId>org.mockito</groupId>
346             <artifactId>mockito-all</artifactId>
347             <scope>test</scope>
348         </dependency>
349         <dependency>
350             <groupId>javax.xml.bind</groupId>
351             <artifactId>jaxb-api</artifactId>
352         </dependency>
353         <dependency>
354             <groupId>org.eclipse.persistence</groupId>
355             <artifactId>eclipselink</artifactId>
356         </dependency>
357         <dependency>
358             <groupId>org.eclipse.persistence</groupId>
359             <artifactId>org.eclipse.persistence.moxy</artifactId>
360             <scope>compile</scope>
361         </dependency>
362         <dependency>
363             <groupId>org.springframework.boot</groupId>
364             <artifactId>spring-boot-starter-web</artifactId>
365             <exclusions>
366                 <exclusion>
367                     <groupId>org.springframework.boot</groupId>
368                     <artifactId>spring-boot-starter-tomcat</artifactId>
369                 </exclusion>
370             </exclusions>
371         </dependency>
372         <dependency>
373             <groupId>org.springframework.boot</groupId>
374             <artifactId>spring-boot-starter-jetty</artifactId>
375         </dependency>
376         <dependency>
377             <groupId>org.springframework.boot</groupId>
378             <artifactId>spring-boot-starter-jersey</artifactId>
379         </dependency>
380         <dependency>
381             <groupId>org.springframework.boot</groupId>
382             <artifactId>spring-boot-starter-aop</artifactId>
383         </dependency>
384         <dependency>
385             <groupId>org.springframework.boot</groupId>
386             <artifactId>spring-boot-test</artifactId>
387             <scope>test</scope>
388         </dependency>
389         <dependency>
390             <groupId>org.springframework</groupId>
391             <artifactId>spring-test</artifactId>
392             <scope>test</scope>
393         </dependency>
394         <dependency>
395             <groupId>org.mockito</groupId>
396             <artifactId>mockito-all</artifactId>
397             <scope>test</scope>
398         </dependency>
399         <dependency>
400             <groupId>org.hamcrest</groupId>
401             <artifactId>hamcrest-junit</artifactId>
402         </dependency>
403     </dependencies>
404     <build>
405         <resources>
406             <resource>
407                 <directory>${project.basedir}/src/main/swm</directory>
408                 <targetPath>${project.build.directory}/swm</targetPath>
409                 <filtering>false</filtering>
410             </resource>
411             <resource>
412                 <directory>${project.basedir}/src/main/resources</directory>
413                 <includes>
414                     <include>application.properties</include>
415                     <include>dme2.properties</include>
416                     <include>logback.xml</include>
417                     <include>localhost-access-logback.xml</include>
418                 </includes>
419                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
420                 <filtering>false</filtering>
421             </resource>
422             <resource>
423                 <directory>${project.basedir}/src/main/resources</directory>
424                 <includes>
425                     <include>**/*</include>
426                 </includes>
427                 <filtering>true</filtering>
428             </resource>
429             <resource>
430                 <directory>${project.basedir}/src/main/resources/etc/appprops/</directory>
431                 <includes>
432                     <include>aaiconfig.properties</include>
433                 </includes>
434                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
435                 <filtering>false</filtering>
436             </resource>
437             <resource>
438                 <directory>${project.basedir}/src/main/resources/etc/auth/</directory>
439                 <includes>
440                     <include>aai-client-cert.p12</include>
441                     <include>tomcat_keystore</include>
442                     <include>aai_policy.json</include>
443                 </includes>
444                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
445                 <filtering>true</filtering>
446             </resource>
447             <resource>
448                 <directory>${project.basedir}/src/main/resources/</directory>
449                 <includes>
450                     <include>logback.xml</include>
451                     <include>localhost-access-logback.xml</include>
452                     <include>hbase-site.xml</include>
453                 </includes>
454                 <targetPath>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig</targetPath>
455                 <filtering>true</filtering>
456             </resource>
457             <resource>
458                 <directory>${project.basedir}/src/main/docker</directory>
459                 <includes>
460                     <include>**/*</include>
461                 </includes>
462                 <targetPath>${aai.build.directory}</targetPath>
463                 <filtering>true</filtering>
464             </resource>
465             <resource>
466                 <directory>${project.build.directory}/</directory>
467                 <includes>
468                     <include>${project.artifactId}-${project.version}.jar</include>
469                 </includes>
470                 <targetPath>${aai.build.directory}/lib/</targetPath>
471                 <filtering>false</filtering>
472             </resource>
473         </resources>
474         <pluginManagement>
475             <plugins>
476                 <plugin>
477                     <groupId>org.codehaus.groovy.maven</groupId>
478                     <artifactId>gmaven-plugin</artifactId>
479                     <version>1.0</version>
480                     <executions>
481                         <execution>
482                             <phase>validate</phase>
483                             <goals>
484                                 <goal>execute</goal>
485                             </goals>
486                             <configuration>
487                                 <source>
488                                     println project.properties['aai.project.version'];
489                                     def versionArray;
490                                     if (project.properties['aai.project.version'] != null) {
491                                         versionArray = project.properties['aai.project.version'].split('\\.');
492                                     }
493
494                                     project.properties["project.major.version"] = versionArray[0];
495                                     project.properties["project.minor.version"] = versionArray[1];
496                                     project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
497                                     println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
498                                 </source>
499                             </configuration>
500                         </execution>
501                     </executions>
502                 </plugin>
503             </plugins>
504         </pluginManagement>
505         <plugins>
506             <plugin>
507                 <groupId>org.springframework.boot</groupId>
508                 <artifactId>spring-boot-maven-plugin</artifactId>
509             </plugin>
510             <plugin>
511                 <groupId>org.apache.maven.plugins</groupId>
512                 <artifactId>maven-clean-plugin</artifactId>
513                 <version>2.4.1</version>
514                 <configuration>
515                     <filesets>
516                         <fileset>
517                             <directory>${project.basedir}/src/main/resources/schema</directory>
518                             <includes>
519                                 <include>**/*</include>
520                             </includes>
521                             <followSymlinks>false</followSymlinks>
522                         </fileset>
523                     </filesets>
524                 </configuration>
525             </plugin>
526             <plugin>
527                 <groupId>org.codehaus.groovy.maven</groupId>
528                 <artifactId>gmaven-plugin</artifactId>
529             </plugin>
530             <plugin>
531                 <groupId>org.apache.maven.plugins</groupId>
532                 <artifactId>maven-dependency-plugin</artifactId>
533                 <version>2.10</version>
534             </plugin>
535             <plugin>
536                 <groupId>org.apache.maven.plugins</groupId>
537                 <artifactId>maven-javadoc-plugin</artifactId>
538                 <version>${javadoc.plugin.version}</version>
539             </plugin>
540             <plugin>
541                 <artifactId>maven-assembly-plugin</artifactId>
542                 <configuration>
543                     <descriptors>
544                         <descriptor>src/main/assembly/descriptor.xml</descriptor>
545                     </descriptors>
546                 </configuration>
547                 <executions>
548                     <execution>
549                         <id>make-assembly</id> <!-- this is used for inheritance merges -->
550                         <phase>package</phase> <!-- bind to the packaging phase -->
551                         <goals>
552                             <goal>single</goal>
553                         </goals>
554                     </execution>
555                 </executions>
556             </plugin>
557             <plugin>
558                 <artifactId>maven-resources-plugin</artifactId>
559                 <version>2.7</version>
560                 <executions>
561                     <execution>
562                         <id>copy-oxm-edgerules-project</id>
563                         <phase>initialize</phase>
564                         <goals>
565                             <goal>copy-resources</goal>
566                         </goals>
567                         <configuration>
568                             <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
569                             <resources>
570                                 <resource>
571                                     <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
572                                     <includes>
573                                         <include>**/oxm/**/*.xml</include>
574                                         <include>**/dbedgerules/**/*.json</include>
575                                     </includes>
576                                 </resource>
577                             </resources>
578                         </configuration>
579                     </execution>
580                     <execution>
581                         <id>copy-queries-project</id>
582                         <phase>initialize</phase>
583                         <goals>
584                             <goal>copy-resources</goal>
585                         </goals>
586                         <configuration>
587                             <outputDirectory>${project.basedir}/src/main/resources/schema</outputDirectory>
588                             <resources>
589                                 <resource>
590                                     <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
591                                     <includes>
592                                         <include>**/query/**/*.json</include>
593                                     </includes>
594                                 </resource>
595                             </resources>
596                         </configuration>
597                     </execution>
598                     <execution>
599                         <id>copy-oxm-edgerules</id>
600                         <phase>initialize</phase>
601                         <goals>
602                             <goal>copy-resources</goal>
603                         </goals>
604                         <configuration>
605                             <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
606                             <resources>
607                                 <resource>
608                                     <directory>${project.basedir}/../aai-schema/src/main/resources/</directory>
609                                     <includes>
610                                         <include>**/oxm/**/*.xml</include>
611                                         <include>**/dbedgerules/**/*.json</include>
612                                     </includes>
613                                 </resource>
614                             </resources>
615                         </configuration>
616                     </execution>
617                     <execution>
618                         <id>copy-queries</id>
619                         <phase>initialize</phase>
620                         <goals>
621                             <goal>copy-resources</goal>
622                         </goals>
623                         <configuration>
624                             <outputDirectory>${project.build.directory}/swm/package/nix/dist_files/opt/app/${project.artifactId}/appconfig/schema/</outputDirectory>
625                             <resources>
626                                 <resource>
627                                     <directory>${project.basedir}/../aai-queries/src/main/resources/schema</directory>
628                                     <includes>
629                                         <include>**/query/**/*.json</include>
630                                     </includes>
631                                 </resource>
632                             </resources>
633                         </configuration>
634                     </execution>
635                 </executions>
636             </plugin>
637             <plugin>
638                 <groupId>org.apache.maven.plugins</groupId>
639                 <artifactId>maven-surefire-plugin</artifactId>
640                 <version>2.12.4</version>
641                 <configuration>
642                     <argLine>-noverify ${argLine}</argLine>
643                     <runOrder>alphabetical</runOrder>
644                 </configuration>
645             </plugin>
646             <plugin>
647                 <groupId>com.mycila</groupId>
648                 <artifactId>license-maven-plugin</artifactId>
649             </plugin>
650             <plugin>
651                 <groupId>org.codehaus.mojo</groupId>
652                 <artifactId>sonar-maven-plugin</artifactId>
653                 <version>3.3</version>
654             </plugin>
655             <plugin>
656                 <groupId>org.jacoco</groupId>
657                 <artifactId>jacoco-maven-plugin</artifactId>
658                 <version>0.7.9</version>
659                 <configuration>
660                     <dumpOnExit>true</dumpOnExit>
661                     <excludes>
662                         <exclude>**/**/models/**/*.class</exclude>
663                     </excludes>
664                 </configuration>
665                 <executions>
666                     <execution>
667                         <id>jacoco-initialize-unit-tests</id>
668                         <goals>
669                             <goal>prepare-agent</goal>
670                         </goals>
671                         <configuration>
672                             <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
673                             <!-- <append>true</append> -->
674                         </configuration>
675                     </execution>
676                     <execution>
677                         <id>post-unit-test</id>
678                         <phase>test</phase>
679                         <goals>
680                             <goal>report</goal>
681                         </goals>
682                         <configuration>
683                             <!-- Sets the path to the file which contains the execution data. -->
684                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
685                             <!-- Sets the output directory for the code coverage report. -->
686                             <outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
687                         </configuration>
688                     </execution>
689                     <execution>
690                         <id>default-check</id>
691                         <goals>
692                             <goal>check</goal>
693                         </goals>
694                         <configuration>
695                             <dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
696                             <rules>
697                                 <!--  implementation is needed only for Maven 2  -->
698                                 <rule implementation="org.jacoco.maven.RuleConfiguration">
699                                     <element>BUNDLE</element>
700                                     <limits>
701                                         <limit implementation="org.jacoco.report.check.Limit">
702                                             <counter>LINE</counter>
703                                             <value>COVEREDRATIO</value>
704                                             <minimum>${jacoco.line.coverage.limit}</minimum>
705                                         </limit>
706                                     </limits>
707                                 </rule>
708                             </rules>
709                         </configuration>
710                     </execution>
711                 </executions>
712             </plugin>
713             <plugin>
714                 <groupId>org.apache.maven.plugins</groupId>
715                 <artifactId>maven-deploy-plugin</artifactId>
716             </plugin>
717
718             <plugin>
719                 <groupId>org.springframework.boot</groupId>
720                 <artifactId>spring-boot-maven-plugin</artifactId>
721                 <version>${spring.boot.version}</version>
722                 <configuration>
723                     <mainClass>${start-class}</mainClass>
724                     <layout>ZIP</layout>
725                 </configuration>
726                 <executions>
727                     <execution>
728                         <goals>
729                             <goal>repackage</goal>
730                         </goals>
731                     </execution>
732                 </executions>
733             </plugin>
734             <plugin>
735                 <groupId>org.apache.maven.plugins</groupId>
736                 <artifactId>maven-clean-plugin</artifactId>
737                 <version>2.4.1</version>
738                 <configuration>
739                     <filesets>
740                         <fileset>
741                             <directory>${project.basedir}/src/main/resources/schema</directory>
742                             <includes>
743                                 <include>**/*</include>
744                             </includes>
745                             <followSymlinks>false</followSymlinks>
746                         </fileset>
747                     </filesets>
748                 </configuration>
749             </plugin>
750         </plugins>
751     </build>
752     <reporting>
753         <plugins>
754             <plugin>
755                 <groupId>org.apache.maven.plugins</groupId>
756                 <artifactId>maven-javadoc-plugin</artifactId>
757                 <version>2.10.4</version>
758                 <configuration>
759                     <failOnError>false</failOnError>
760                     <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
761                     <docletArtifact>
762                         <groupId>org.umlgraph</groupId>
763                         <artifactId>umlgraph</artifactId>
764                         <version>5.6</version>
765                     </docletArtifact>
766                     <additionalparam>-views</additionalparam>
767                     <useStandardDocletOptions>true</useStandardDocletOptions>
768                 </configuration>
769             </plugin>
770         </plugins>
771     </reporting>
772 </project>