1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
4 Modifications copyright (C) 2019 AT&T Intellectual Property
5 Modifications Copyright (C) 2019-2020 Nordix Foundation.
6 Modifications Copyright (C) 2020 Bell Canada.
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
20 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21 <modelVersion>4.0.0</modelVersion>
23 <groupId>org.onap.oparent</groupId>
24 <artifactId>version</artifactId>
25 <!-- When changing, also change the property reference in the file below -->
26 <version>3.3.4-SNAPSHOT</version>
27 <relativePath>..</relativePath>
29 <artifactId>oparent</artifactId>
30 <name>oparent/oparent</name>
31 <packaging>pom</packaging>
33 <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
34 <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
36 <url>https://wiki.onap.org/display/DW/Integration+Project</url>
39 <jacoco.version>0.8.5</jacoco.version>
40 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
41 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
42 <!-- Default Sonar configuration -->
43 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
44 <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
45 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
46 <!-- If following file exist, auto-generation of swagger.json will be done -->
47 <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
48 <!-- If following file exist, auto-generation of sdk will be done -->
49 <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
57 <groupId>org.owasp</groupId>
58 <artifactId>dependency-check-maven</artifactId>
59 <version>5.3.2</version>
73 <id>generate-json</id>
76 <exists>${swagger-properties}</exists>
79 <name>swagger-sdk.generate-json</name>
85 <groupId>org.codehaus.mojo</groupId>
86 <artifactId>properties-maven-plugin</artifactId>
87 <version>1.0.0</version>
90 <phase>initialize</phase>
92 <goal>read-project-properties</goal>
96 <file>${basedir}/src/main/resources/swagger.properties</file>
103 <groupId>com.github.kongchen</groupId>
104 <artifactId>swagger-maven-plugin</artifactId>
105 <version>3.1.4</version>
109 <locations>${api-rest-package}</locations>
110 <schemes>http,https</schemes>
111 <host>${api-host-ip}:${api-host-port}</host>
112 <basePath>${api-base-path}</basePath>
114 <title>${api-title}</title>
115 <version>${api-version}</version>
116 <description>${api-description}</description>
118 <name>${api-license}</name>
121 <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
127 <phase>compile</phase>
129 <goal>generate</goal>
135 <groupId>org.apache.maven.plugins</groupId>
136 <artifactId>maven-install-plugin</artifactId>
137 <version>2.3.1</version>
140 <id>install-file-id</id>
141 <phase>install</phase>
143 <goal>install-file</goal>
146 <file>${basedir}/src/main/resources/swagger.json</file>
147 <groupId>${project.groupId}</groupId>
148 <artifactId>${project.artifactId}-swagger-schema</artifactId>
149 <version>${project.version}</version>
150 <packaging>json</packaging>
159 <id>generate-sdk</id>
162 <exists>${swagger-json}</exists>
165 <name>swagger-sdk.generate-java-sdk</name>
171 <groupId>org.apache.maven.plugins</groupId>
172 <artifactId>maven-antrun-plugin</artifactId>
173 <version>1.8</version>
176 <phase>initialize</phase>
177 <id>ant-create-script</id>
179 <exportAntProperties>true</exportAntProperties>
181 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
182 <condition property="is_windows" value="true">
183 <os family="windows"/>
185 <condition property="isLinux" value="true">
189 <equals arg1="${is_windows}" arg2="true"/>
191 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
192 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
193 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
196 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
197 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
198 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
199 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
211 <groupId>ant-contrib</groupId>
212 <artifactId>ant-contrib</artifactId>
213 <version>1.0b3</version>
216 <artifactId>ant</artifactId>
217 <groupId>ant</groupId>
224 <groupId>io.swagger</groupId>
225 <artifactId>swagger-codegen-maven-plugin</artifactId>
226 <version>2.2.1</version>
230 <goal>generate</goal>
233 <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
234 <output>${project.build.directory}/generated-sources</output>
235 <language>java</language>
237 <dateLibrary>joda</dateLibrary>
239 <library>jersey2</library>
240 <groupId>${project.groupId}</groupId>
241 <artifactId>${project.artifactId}-java-sdk</artifactId>
242 <artifactVersion>${project.version}</artifactVersion>
243 <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
244 <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
245 <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
251 <artifactId>exec-maven-plugin</artifactId>
252 <groupId>org.codehaus.mojo</groupId>
253 <version>1.5.0</version>
256 <id>swagger-generate-sources</id>
257 <phase>generate-sources</phase>
262 <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
268 <groupId>org.apache.maven.plugins</groupId>
269 <artifactId>maven-clean-plugin</artifactId>
270 <version>3.0.0</version>
273 <id>clean-generated-files</id>
274 <phase>generate-sources</phase>
281 <directory>${project.build.directory}/generated-sources</directory>
292 <groupId>org.onap.msb.swagger-sdk</groupId>
293 <artifactId>swagger-sdk</artifactId>
294 <version>1.0.0</version>
303 <groupId>org.jacoco</groupId>
304 <artifactId>jacoco-maven-plugin</artifactId>
305 <version>${jacoco.version}</version>
307 <!-- Note: This exclusion list should match <sonar.exclusions>
310 <exclude>**/gen/**</exclude>
311 <exclude>**/generated-sources/**</exclude>
312 <exclude>**/yang-gen/**</exclude>
313 <exclude>**/pax/**</exclude>
318 Prepares the property pointing to the JaCoCo runtime agent which
319 is passed as VM argument when Maven the Surefire plugin is executed.
322 <id>pre-unit-test</id>
324 <goal>prepare-agent</goal>
327 <!-- Sets the path to the file which contains the execution data. -->
328 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
330 Sets the name of the property containing the settings
331 for JaCoCo runtime agent.
333 <propertyName>surefireArgLine</propertyName>
337 Ensures that the code coverage report for unit tests is created after
338 unit tests have been run.
341 <id>post-unit-test</id>
347 <!-- Sets the path to the file which contains the execution data. -->
348 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
349 <!-- Sets the output directory for the code coverage report. -->
350 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
354 <id>pre-integration-test</id>
355 <phase>pre-integration-test</phase>
357 <goal>prepare-agent</goal>
360 <!-- Sets the path to the file which contains the execution data. -->
361 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
363 Sets the name of the property containing the settings
364 for JaCoCo runtime agent.
366 <propertyName>failsafeArgLine</propertyName>
370 Ensures that the code coverage report for integration tests after
371 integration tests have been run.
374 <id>post-integration-test</id>
375 <phase>post-integration-test</phase>
380 <!-- Sets the path to the file which contains the execution data. -->
381 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
382 <!-- Sets the output directory for the code coverage report. -->
383 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
389 <groupId>org.apache.maven.plugins</groupId>
390 <artifactId>maven-surefire-plugin</artifactId>
391 <version>3.0.0-M4</version>
393 <!-- Sets the VM argument line used when unit tests are run. -->
394 <argLine>${surefireArgLine}</argLine>
395 <!-- Excludes integration tests when unit tests are run. -->
397 <exclude>**/IT*.java</exclude>
402 <groupId>org.apache.maven.plugins</groupId>
403 <artifactId>maven-failsafe-plugin</artifactId>
404 <version>3.0.0-M4</version>
407 Ensures that both integration-test and verify goals of the Failsafe Maven
411 <id>integration-tests</id>
413 <goal>integration-test</goal>
417 <!-- Sets the VM argument line used when integration tests are run. -->
418 <argLine>${failsafeArgLine}</argLine>
423 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
425 <groupId>org.sonarsource.scanner.maven</groupId>
426 <artifactId>sonar-maven-plugin</artifactId>
427 <version>${sonar.scanner.version}</version>
430 <groupId>org.apache.maven.plugins</groupId>
431 <artifactId>maven-checkstyle-plugin</artifactId>
432 <version>3.1.1</version>
435 <groupId>com.puppycrawl.tools</groupId>
436 <artifactId>checkstyle</artifactId>
437 <version>8.43</version>
445 <artifactId>maven-checkstyle-plugin</artifactId>
448 <groupId>org.onap.oparent</groupId>
449 <artifactId>checkstyle</artifactId>
450 <version>[3.3.3,)</version>
455 <id>onap-license</id>
459 <phase>process-sources</phase>
461 <configLocation>onap-checkstyle/check-license.xml</configLocation>
462 <includeResources>false</includeResources>
463 <includeTestSourceDirectory>true</includeTestSourceDirectory>
464 <includeTestResources>false</includeTestResources>
466 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
470 <consoleOutput>true</consoleOutput>
471 <failOnViolation>false</failOnViolation>
475 <id>onap-java-style</id>
479 <phase>process-sources</phase>
481 <!-- Use Google Java Style Guide:
482 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
483 with minor changes -->
484 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
485 <!-- <sourceDirectories> is needed so that checkstyle ignores the generated sources directory -->
487 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
489 <includeResources>true</includeResources>
490 <includeTestSourceDirectory>true</includeTestSourceDirectory>
491 <includeTestResources>true</includeTestResources>
494 <consoleOutput>true</consoleOutput>
495 <failOnViolation>false</failOnViolation>
501 <groupId>org.codehaus.mojo</groupId>
502 <artifactId>build-helper-maven-plugin</artifactId>
503 <version>1.12</version>
505 <!-- Jacoco / Sonar -->
507 <groupId>org.jacoco</groupId>
508 <artifactId>jacoco-maven-plugin</artifactId>
511 <groupId>org.apache.maven.plugins</groupId>
512 <artifactId>maven-surefire-plugin</artifactId>
515 <groupId>org.apache.maven.plugins</groupId>
516 <artifactId>maven-failsafe-plugin</artifactId>