blob: 3b4753df587a31cd5a4c96486a2abb4d2fc8f034 [file] [log] [blame]
mark.j.leonard6e4f04a2018-04-26 16:53:12 +01001<?xml version="1.0" encoding="UTF-8"?>
Steve Smokowskief768a72017-02-09 15:43:35 -05002<!--
mark.j.leonard6e4f04a2018-04-26 16:53:12 +01003 ============LICENSE_START=======================================================
4 org.onap.aai
5 ================================================================================
6 Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7 Copyright © 2017-2018 European Software Marketing Ltd.
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
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +010012
mark.j.leonard6e4f04a2018-04-26 16:53:12 +010013 http://www.apache.org/licenses/LICENSE-2.0
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +010014
mark.j.leonard6e4f04a2018-04-26 16:53:12 +010015 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-->
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +000022<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
Steve Smokowskief768a72017-02-09 15:43:35 -050024 <modelVersion>4.0.0</modelVersion>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +000025
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -040026 <parent>
Jimmy Forsyth7e645462020-03-31 17:17:45 -040027 <groupId>org.onap.oparent</groupId>
28 <artifactId>oparent</artifactId>
29 <version>2.1.0</version>
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +000030 <relativePath />
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -040031 </parent>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +000032
Arul.Nambi059f42e2017-09-13 15:13:29 -040033 <groupId>org.onap.aai.model-loader</groupId>
Steve Smokowskief768a72017-02-09 15:43:35 -050034 <artifactId>model-loader</artifactId>
Gildas Lanilis5cb976c2018-09-06 11:21:12 -070035 <name>aai-model-loader</name>
wr148df849a772022-02-22 16:12:02 -050036 <version>1.9.2-SNAPSHOT</version>
Jimmy Forsyth7e645462020-03-31 17:17:45 -040037
38 <dependencyManagement>
39 <dependencies>
40 <dependency>
41 <groupId>org.springframework.boot</groupId>
42 <artifactId>spring-boot-dependencies</artifactId>
43 <version>${spring-boot.version}</version>
44 <type>pom</type>
45 <scope>import</scope>
46 </dependency>
47 </dependencies>
48 </dependencyManagement>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +000049
Steve Smokowskief768a72017-02-09 15:43:35 -050050 <properties>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +010051 <start-class>org.onap.aai.modelloader.service.ModelLoaderApplication</start-class>
Blackwell, Ian (ib733q)65757e72018-04-05 11:52:58 +010052 <nexusproxy>https://nexus.onap.org</nexusproxy>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +010053 <docker.location>${basedir}/target</docker.location>
Jimmy Forsyth7e645462020-03-31 17:17:45 -040054 <spring-boot.version>2.1.12.RELEASE</spring-boot.version>
55 <apache.commons-text.version>1.8</apache.commons-text.version>
56 <commons-compress.version>1.19</commons-compress.version>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +010057 <hamcrest-all.version>1.3</hamcrest-all.version>
wr148df849a772022-02-22 16:12:02 -050058 <babel.version>1.9.3</babel.version>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +010059 <aai.rest.client.version>1.2.1</aai.rest.client.version>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +010060 <sdc-distribution-client.version>1.4.1</sdc-distribution-client.version>
Jimmy Forsyth7e645462020-03-31 17:17:45 -040061 <logback.version>1.2.3</logback.version>
Dmitry Puzikov86359a22019-04-16 16:52:05 +020062 <!-- docker related properties -->
63 <docker.fabric.version>0.28.0</docker.fabric.version>
64 <aai.docker.version>1.0.0</aai.docker.version>
65 <aai.build.directory>${project.build.directory}/${project.artifactId}-${project.version}-build/</aai.build.directory>
66 <aai.docker.namespace>onap</aai.docker.namespace>
67 <aai.base.image>alpine</aai.base.image>
wr148d8e9c7632021-09-20 11:44:09 -040068 <aai.base.image.version>1.9.0</aai.base.image.version>
Dmitry Puzikov86359a22019-04-16 16:52:05 +020069 <!-- This will be used for the docker images as the default format of maven build has issues -->
70 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
Jimmy Forsythb285db32020-04-01 11:01:47 -040071
72 <sonar.jacoco.reportPath />
73 <sonar.jacoco.itReportPath />
74 <sonar.jacoco.reportMissing.force.zero />
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +010075
Jimmy Forsythb285db32020-04-01 11:01:47 -040076 <jacoco.line.coverage.limit>0.75</jacoco.line.coverage.limit>
77 <jacoco.version>0.8.5</jacoco.version>
78 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
79 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
80 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
81 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
82
83 <sonar.scanner.version>3.7.0.1746</sonar.scanner.version>
84
Maharajh, Robby (rx2202)e83a8f32021-02-24 13:32:28 -050085 <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
86 <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
87 <maven-compiler-plugin.source>11</maven-compiler-plugin.source>
88 <maven-compiler-plugin.target>11</maven-compiler-plugin.target>
89 <maven-compiler-plugin.test.source>11</maven-compiler-plugin.test.source>
90 <maven-compiler-plugin.test.target>11</maven-compiler-plugin.test.target>
Steve Smokowskief768a72017-02-09 15:43:35 -050091 </properties>
Steve Smokowskief768a72017-02-09 15:43:35 -050092
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +000093 <distributionManagement>
94 <repository>
95 <id>ecomp-releases</id>
96 <name>ECOMP Release Repository</name>
97 <url>${nexusproxy}/content/repositories/releases/</url>
98 </repository>
99 <snapshotRepository>
100 <id>ecomp-snapshots</id>
101 <name>ECOMP Snapshot Repository</name>
102 <url>${nexusproxy}/content/repositories/snapshots/</url>
103 </snapshotRepository>
104 </distributionManagement>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100105
Dmitry Puzikov86359a22019-04-16 16:52:05 +0200106 <profiles>
107 <!-- Docker profile to be used for building docker image and pushing to nexus -->
108 <profile>
109 <id>docker</id>
110 <build>
111 <plugins>
112 <plugin>
113 <groupId>org.codehaus.mojo</groupId>
114 <artifactId>build-helper-maven-plugin</artifactId>
115 <version>3.0.0</version>
116 <executions>
117 <execution>
118 <phase>pre-clean</phase>
119 <id>parse-version</id>
120 <goals>
121 <goal>parse-version</goal>
122 </goals>
123 </execution>
124 </executions>
125 </plugin>
126 <plugin>
127 <groupId>org.codehaus.groovy.maven</groupId>
128 <artifactId>gmaven-plugin</artifactId>
129 <version>1.0</version>
130 <executions>
131 <execution>
132 <phase>pre-clean</phase>
133 <goals>
134 <goal>execute</goal>
135 </goals>
136 <configuration>
137 <source>
138 def userAaiBaseImage = session.userProperties['aai.base.image'];
139 def userAaiCommonVersion = session.userProperties['aai.base.image.version'];
140 if (userAaiCommonVersion != null) {
141 project.properties['aai.base.image.version'] = userAaiCommonVersion;
142 }
143 if (userAaiBaseImage != null) {
144 project.properties['aai.base.image'] = userAaiBaseImage;
145 }
146 log.info 'Base image flavour: ' + project.properties['aai.base.image'];
147 log.info 'Base image version: ' + project.properties['aai.base.image.version'];
148 </source>
149 </configuration>
150 </execution>
151 </executions>
152 </plugin>
153 <plugin>
154 <groupId>io.fabric8</groupId>
155 <artifactId>docker-maven-plugin</artifactId>
156 <version>${docker.fabric.version}</version>
157 <configuration>
158 <verbose>true</verbose>
159 <apiVersion>1.23</apiVersion>
160 <images>
161 <image>
162 <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l</name>
163 <build>
164 <filter>@</filter>
165 <tags>
166 <tag>latest</tag>
167 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
168 <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
169 </tags>
170 <cleanup>try</cleanup>
171 <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
172 <assembly>
173 <inline>
174 <fileSets>
175 <fileSet>
176 <directory>${aai.build.directory}</directory>
177 <outputDirectory>/${project.artifactId}</outputDirectory>
178 </fileSet>
179 </fileSets>
180 </inline>
181 </assembly>
182 </build>
183 </image>
184 </images>
185 </configuration>
186 <executions>
187 <execution>
188 <id>clean-images</id>
189 <phase>pre-clean</phase>
190 <goals>
191 <goal>remove</goal>
192 </goals>
193 <configuration>
194 <removeAll>true</removeAll>
195 </configuration>
196 </execution>
197 <execution>
198 <id>generate-images</id>
199 <phase>package</phase>
200 <goals>
201 <goal>build</goal>
202 </goals>
203 </execution>
204 <execution>
205 <id>push-images</id>
206 <phase>deploy</phase>
207 <goals>
208 <goal>push</goal>
209 </goals>
210 </execution>
211 </executions>
212 </plugin>
213 </plugins>
214 </build>
215 </profile>
216 </profiles>
217
Steve Smokowskief768a72017-02-09 15:43:35 -0500218 <dependencies>
Steve Smokowskief768a72017-02-09 15:43:35 -0500219 <dependency>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100220 <groupId>org.springframework.boot</groupId>
jimmyf3b10772018-12-20 15:18:47 -0500221 <artifactId>spring-boot-starter-jetty</artifactId>
222 </dependency>
223 <dependency>
224 <groupId>org.springframework.boot</groupId>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100225 <artifactId>spring-boot-starter-web</artifactId>
jimmyf3b10772018-12-20 15:18:47 -0500226 <exclusions>
227 <exclusion>
228 <groupId>org.springframework.boot</groupId>
229 <artifactId>spring-boot-starter-tomcat</artifactId>
230 </exclusion>
231 </exclusions>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100232 </dependency>
233 <dependency>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100234 <groupId>org.onap.aai</groupId>
235 <artifactId>babel</artifactId>
236 <version>${babel.version}</version>
237 <classifier>client</classifier>
238 <exclusions>
239 <exclusion>
240 <groupId>*</groupId>
241 <artifactId>*</artifactId>
242 </exclusion>
243 </exclusions>
244 </dependency>
245 <dependency>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100246 <groupId>org.glassfish.jersey.core</groupId>
247 <artifactId>jersey-common</artifactId>
248 <scope>test</scope>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100249 </dependency>
250 <dependency>
251 <groupId>org.onap.aai</groupId>
252 <artifactId>rest-client</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400253 <version>${aai.rest.client.version}</version>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100254 </dependency>
255 <dependency>
256 <groupId>com.google.code.gson</groupId>
257 <artifactId>gson</artifactId>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100258 </dependency>
259
260 <!-- Test dependencies -->
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100261 <!-- https://mvnrepository.com/artifact/com.mikesamuel/json-sanitizer -->
Steve Smokowskief768a72017-02-09 15:43:35 -0500262 <dependency>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100263 <groupId>com.mikesamuel</groupId>
264 <artifactId>json-sanitizer</artifactId>
265 <version>1.2.0</version>
Steve Smokowskief768a72017-02-09 15:43:35 -0500266 </dependency>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100267
Steve Smokowskief768a72017-02-09 15:43:35 -0500268 <!-- Common logging framework -->
269 <dependency>
Arul.Nambiaf1121f2017-09-21 10:39:37 -0400270 <groupId>org.onap.aai.logging-service</groupId>
Steve Smokowskief768a72017-02-09 15:43:35 -0500271 <artifactId>common-logging</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400272 <version>1.5.0</version>
Steve Smokowskief768a72017-02-09 15:43:35 -0500273 </dependency>
Steve Smokowskief768a72017-02-09 15:43:35 -0500274 <dependency>
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -0400275 <groupId>ch.qos.logback</groupId>
mark.j.leonardddecfbc2018-05-01 11:57:53 +0100276 <artifactId>logback-classic</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400277 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
mark.j.leonardddecfbc2018-05-01 11:57:53 +0100278 </dependency>
279 <dependency>
280 <groupId>ch.qos.logback</groupId>
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -0400281 <artifactId>logback-core</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400282 <version>${logback.version}</version><!--$NO-MVN-MAN-VER$ -->
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -0400283 </dependency>
Fraboni, Gino (gf403a)578368f2017-05-03 13:47:43 -0400284 <dependency>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100285 <groupId>org.onap.sdc.sdc-distribution-client</groupId>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000286 <artifactId>sdc-distribution-client</artifactId>
mark.j.leonardc5aea4a2018-06-06 14:47:42 +0100287 <version>${sdc-distribution-client.version}</version>
Lee, Tian (tl5884)952a19d2017-08-18 16:45:23 +0100288 </dependency>
289 <dependency>
Steve Smokowskief768a72017-02-09 15:43:35 -0500290 <groupId>org.json</groupId>
291 <artifactId>json</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400292 <version>20131018</version><!--$NO-MVN-MAN-VER$ -->
Steve Smokowskief768a72017-02-09 15:43:35 -0500293 </dependency>
Steve Smokowskief768a72017-02-09 15:43:35 -0500294 <dependency>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000295 <groupId>org.eclipse.jetty</groupId>
296 <artifactId>jetty-security</artifactId>
Steve Smokowskief768a72017-02-09 15:43:35 -0500297 </dependency>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000298 <dependency>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000299 <groupId>jline</groupId>
300 <artifactId>jline</artifactId>
301 <version>2.12.1</version>
302 </dependency>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100303 <dependency>
mark.j.leonard7e6fe8c2018-06-07 16:45:38 +0100304 <groupId>org.apache.commons</groupId>
305 <artifactId>commons-compress</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400306 <version>${commons-compress.version}</version>
mark.j.leonard7e6fe8c2018-06-07 16:45:38 +0100307 </dependency>
308 <dependency>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100309 <groupId>commons-io</groupId>
310 <artifactId>commons-io</artifactId>
wr148df849a772022-02-22 16:12:02 -0500311 <version>2.11.0</version>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100312 </dependency>
313 <dependency>
314 <groupId>org.apache.commons</groupId>
315 <artifactId>commons-text</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400316 <version>${apache.commons-text.version}</version>
Blackwell, Ian (ib733q)7b1f8132018-04-03 17:28:44 +0100317 </dependency>
Gary Wu1c792412018-08-24 15:15:28 -0700318
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +0000319 <!-- Test dependencies -->
320 <dependency>
321 <groupId>junit</groupId>
322 <artifactId>junit</artifactId>
323 <scope>test</scope>
324 </dependency>
325 <dependency>
326 <groupId>org.hamcrest</groupId>
327 <artifactId>hamcrest-all</artifactId>
328 <version>${hamcrest-all.version}</version>
329 <scope>test</scope>
330 </dependency>
331 <dependency>
332 <groupId>org.mockito</groupId>
333 <artifactId>mockito-core</artifactId>
334 <scope>test</scope>
335 </dependency>
336 <dependency>
337 <groupId>org.springframework.boot</groupId>
338 <artifactId>spring-boot-starter-test</artifactId>
339 <scope>test</scope>
340 </dependency>
Steve Smokowskief768a72017-02-09 15:43:35 -0500341 </dependencies>
Steve Smokowskie6908712017-02-10 16:08:20 -0500342
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +0000343 <!-- Plugins and repositories -->
344 <pluginRepositories>
345 <pluginRepository>
346 <id>central</id>
347 <url>http://repo1.maven.org/maven2</url>
348 </pluginRepository>
349 <pluginRepository>
350 <id>EvoSuite</id>
351 <name>EvoSuite Repository</name>
352 <url>http://www.evosuite.org/m2</url>
353 </pluginRepository>
354 </pluginRepositories>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000355
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +0000356 <repositories>
357 <repository>
358 <id>central</id>
359 <name>Maven 2 repository 2</name>
360 <url>http://repo2.maven.org/maven2/</url>
361 </repository>
362 <repository>
363 <id>ecomp-releases</id>
364 <name>ECOMP Release Repository</name>
365 <url>${nexusproxy}/content/repositories/releases/</url>
366 </repository>
367 <repository>
368 <id>ecomp-snapshots</id>
369 <name>ECOMP Snapshot Repository</name>
370 <url>${nexusproxy}/content/repositories/snapshots/</url>
371 </repository>
372 <repository>
373 <id>ecomp-staging</id>
374 <name>ECOMP Staging Repository</name>
375 <url>${nexusproxy}/content/repositories/staging/</url>
376 </repository>
377 </repositories>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000378
Steve Smokowskief768a72017-02-09 15:43:35 -0500379 <build>
380 <plugins>
381 <plugin>
Maharajh, Robby (rx2202)e83a8f32021-02-24 13:32:28 -0500382 <groupId>org.apache.maven.plugins</groupId>
383 <artifactId>maven-compiler-plugin</artifactId>
384 <version>${maven-compiler-plugin.version}</version>
385 <inherited>true</inherited>
386 <configuration>
387 <source>${maven-compiler-plugin.source}</source>
388 <target>${maven-compiler-plugin.target}</target>
389 <testSource>${maven-compiler-plugin.test.source}</testSource>
390 <testTarget>${maven-compiler-plugin.test.target}</testTarget>
391 </configuration>
392 </plugin>
393 <plugin>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100394 <groupId>org.springframework.boot</groupId>
395 <artifactId>spring-boot-maven-plugin</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400396 <version>${spring-boot.version}</version>
mark.j.leonard6e4f04a2018-04-26 16:53:12 +0100397 <configuration>
398 <executable>true</executable>
399 </configuration>
400 <executions>
401 <execution>
402 <goals>
403 <goal>repackage</goal>
404 </goals>
405 </execution>
406 </executions>
407 </plugin>
408 <plugin>
Lee, Tian (tl5884)cb6bc642018-11-06 15:36:40 +0000409 <groupId>com.mycila</groupId>
410 <artifactId>license-maven-plugin</artifactId>
411 <version>3.0</version>
412 <configuration>
413 <header>License.txt</header>
414 <includes>
415 <include>src/main/java/**</include>
416 <include>src/test/java/**</include>
417 <include>version/properties</include>
418 <include>pom.xml</include>
419 </includes>
420 <skipExistingHeaders>true</skipExistingHeaders>
421 </configuration>
422 <executions>
423 <execution>
424 <goals>
425 <!-- Set goal to "format" to auto update license headers -->
426 <goal>check</goal>
427 </goals>
428 <phase>process-sources</phase>
429 </execution>
430 </executions>
431 </plugin>
Venkata Harish K Kajur8d5d8862017-02-20 21:33:52 +0000432 <plugin>
Dmitry Puzikov86359a22019-04-16 16:52:05 +0200433 <groupId>org.apache.maven.plugins</groupId>
434 <artifactId>maven-deploy-plugin</artifactId>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400435 <configuration>
Jimmy Forsyth9d647392020-04-01 16:10:31 -0400436 <classifier>client</classifier>
Jimmy Forsyth7e645462020-03-31 17:17:45 -0400437 </configuration>
Venkata Harish K Kajur8d5d8862017-02-20 21:33:52 +0000438 </plugin>
439 <plugin>
Dmitry Puzikov86359a22019-04-16 16:52:05 +0200440 <artifactId>maven-assembly-plugin</artifactId>
441 <configuration>
442 <descriptors>
443 <descriptor>src/main/assembly/descriptor.xml</descriptor>
444 </descriptors>
445 </configuration>
446 <executions>
447 <execution>
448 <id>make-assembly</id>
449 <phase>package</phase>
450 <goals>
451 <goal>single</goal>
452 </goals>
453 </execution>
454 </executions>
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000455 </plugin>
Jimmy Forsythb285db32020-04-01 11:01:47 -0400456
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100457 <!-- once we connect aai-parent or oparent 3.0+ we can take out this
Jimmy Forsythb285db32020-04-01 11:01:47 -0400458 whole section -->
459
460 <plugin>
461 <groupId>org.jacoco</groupId>
462 <artifactId>jacoco-maven-plugin</artifactId>
463 <version>${jacoco.version}</version>
464 <configuration>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100465 <!-- Note: This exclusion list should match <sonar.exclusions> property
Jimmy Forsythb285db32020-04-01 11:01:47 -0400466 above -->
467 <excludes>
468 <exclude>**/gen/**</exclude>
469 <exclude>**/generated-sources/**</exclude>
470 <exclude>**/yang-gen/**</exclude>
471 <exclude>**/pax/**</exclude>
472 </excludes>
473 </configuration>
474 <executions>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100475 <!-- Prepares the property pointing to the JaCoCo runtime agent which
Jimmy Forsythb285db32020-04-01 11:01:47 -0400476 is passed as VM argument when Maven the Surefire plugin is executed. -->
477 <execution>
478 <id>pre-unit-test</id>
479 <goals>
480 <goal>prepare-agent</goal>
481 </goals>
482 <configuration>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100483 <!-- Sets the path to the file which contains the execution data
Jimmy Forsythb285db32020-04-01 11:01:47 -0400484 . -->
485 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100486 <!-- Sets the name of the property containing the settings for JaCoCo
Jimmy Forsythb285db32020-04-01 11:01:47 -0400487 runtime agent. -->
488 <propertyName>surefireArgLine</propertyName>
489 </configuration>
490 </execution>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100491 <!-- Ensures that the code coverage report for unit tests is created
Jimmy Forsythb285db32020-04-01 11:01:47 -0400492 after unit tests have been run. -->
493 <execution>
494 <id>post-unit-test</id>
495 <phase>test</phase>
496 <goals>
497 <goal>report</goal>
498 </goals>
499 <configuration>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100500 <!-- Sets the path to the file which contains the execution data
Jimmy Forsythb285db32020-04-01 11:01:47 -0400501 . -->
502 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
503 <!-- Sets the output directory for the code coverage report. -->
504 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
505 </configuration>
506 </execution>
507 <execution>
508 <id>pre-integration-test</id>
509 <phase>pre-integration-test</phase>
510 <goals>
511 <goal>prepare-agent</goal>
512 </goals>
513 <configuration>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100514 <!-- Sets the path to the file which contains the execution data
Jimmy Forsythb285db32020-04-01 11:01:47 -0400515 . -->
516 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100517 <!-- Sets the name of the property containing the settings for JaCoCo
Jimmy Forsythb285db32020-04-01 11:01:47 -0400518 runtime agent. -->
519 <propertyName>failsafeArgLine</propertyName>
520 </configuration>
521 </execution>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100522 <!-- Ensures that the code coverage report for integration tests after
Jimmy Forsythb285db32020-04-01 11:01:47 -0400523 integration tests have been run. -->
524 <execution>
525 <id>post-integration-test</id>
526 <phase>post-integration-test</phase>
527 <goals>
528 <goal>report</goal>
529 </goals>
530 <configuration>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100531 <!-- Sets the path to the file which contains the execution data
Jimmy Forsythb285db32020-04-01 11:01:47 -0400532 . -->
533 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
534 <!-- Sets the output directory for the code coverage report. -->
535 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
536 </configuration>
537 </execution>
538 <execution>
539 <id>default-check</id>
540 <goals>
541 <goal>check</goal>
542 </goals>
543 <configuration>
544 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
545 <rules>
546 <rule implementation="org.jacoco.maven.RuleConfiguration">
547 <element>BUNDLE</element>
548 <limits>
549 <limit implementation="org.jacoco.report.check.Limit">
550 <counter>LINE</counter>
551 <value>COVEREDRATIO</value>
552 <minimum>${jacoco.line.coverage.limit}</minimum>
553 </limit>
554 </limits>
555 </rule>
556 </rules>
557 </configuration>
558 </execution>
559 </executions>
560 </plugin>
561 <plugin>
562 <groupId>org.apache.maven.plugins</groupId>
563 <artifactId>maven-surefire-plugin</artifactId>
564 <version>3.0.0-M4</version>
565 <configuration>
566 <!-- Sets the VM argument line used when unit tests are run. -->
567 <argLine>${surefireArgLine}</argLine>
568 <!-- Excludes integration tests when unit tests are run. -->
569 <excludes>
570 <exclude>**/IT*.java</exclude>
571 </excludes>
572 </configuration>
573 </plugin>
574 <plugin>
575 <groupId>org.apache.maven.plugins</groupId>
576 <artifactId>maven-failsafe-plugin</artifactId>
577 <version>3.0.0-M4</version>
578 <executions>
Sylvain Desbureauxaecbb492021-02-01 16:09:23 +0100579 <!-- Ensures that both integration-test and verify goals of the Failsafe
Jimmy Forsythb285db32020-04-01 11:01:47 -0400580 Maven plugin are executed. -->
581 <execution>
582 <id>integration-tests</id>
583 <goals>
584 <goal>integration-test</goal>
585 <goal>verify</goal>
586 </goals>
587 <configuration>
588 <!-- Sets the VM argument line used when integration tests are run. -->
589 <argLine>${failsafeArgLine}</argLine>
590 </configuration>
591 </execution>
592 </executions>
593 </plugin>
594 <plugin>
595 <groupId>org.sonarsource.scanner.maven</groupId>
596 <artifactId>sonar-maven-plugin</artifactId>
597 <version>${sonar.scanner.version}</version>
598 </plugin>
599 <!-- end removable sonar config -->
600
601
602
Lee, Tian (tl5884)46a2b5f2017-11-29 15:29:18 +0000603 </plugins>
Steve Smokowskief768a72017-02-09 15:43:35 -0500604 </build>
Steve Smokowskief768a72017-02-09 15:43:35 -0500605</project>