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 <version>3.3.2-SNAPSHOT</version>
26 <relativePath>..</relativePath>
28 <artifactId>oparent</artifactId>
29 <name>oparent/oparent</name>
30 <packaging>pom</packaging>
32 <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
33 <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
35 <url>https://wiki.onap.org/display/DW/Integration+Project</url>
38 <jacoco.version>0.8.5</jacoco.version>
39 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
40 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
41 <!-- Default Sonar configuration -->
42 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
43 <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
44 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
45 <!-- If following file exist, auto-generation of swagger.json will be done -->
46 <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
47 <!-- If following file exist, auto-generation of sdk will be done -->
48 <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
56 <groupId>org.owasp</groupId>
57 <artifactId>dependency-check-maven</artifactId>
58 <version>5.3.2</version>
72 <id>generate-json</id>
75 <exists>${swagger-properties}</exists>
78 <name>swagger-sdk.generate-json</name>
84 <groupId>org.codehaus.mojo</groupId>
85 <artifactId>properties-maven-plugin</artifactId>
86 <version>1.0.0</version>
89 <phase>initialize</phase>
91 <goal>read-project-properties</goal>
95 <file>${basedir}/src/main/resources/swagger.properties</file>
102 <groupId>com.github.kongchen</groupId>
103 <artifactId>swagger-maven-plugin</artifactId>
104 <version>3.1.4</version>
108 <locations>${api-rest-package}</locations>
109 <schemes>http,https</schemes>
110 <host>${api-host-ip}:${api-host-port}</host>
111 <basePath>${api-base-path}</basePath>
113 <title>${api-title}</title>
114 <version>${api-version}</version>
115 <description>${api-description}</description>
117 <name>${api-license}</name>
120 <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
126 <phase>compile</phase>
128 <goal>generate</goal>
134 <groupId>org.apache.maven.plugins</groupId>
135 <artifactId>maven-install-plugin</artifactId>
136 <version>2.3.1</version>
139 <id>install-file-id</id>
140 <phase>install</phase>
142 <goal>install-file</goal>
145 <file>${basedir}/src/main/resources/swagger.json</file>
146 <groupId>${project.groupId}</groupId>
147 <artifactId>${project.artifactId}-swagger-schema</artifactId>
148 <version>${project.version}</version>
149 <packaging>json</packaging>
158 <id>generate-sdk</id>
161 <exists>${swagger-json}</exists>
164 <name>swagger-sdk.generate-java-sdk</name>
170 <groupId>org.apache.maven.plugins</groupId>
171 <artifactId>maven-antrun-plugin</artifactId>
172 <version>1.8</version>
175 <phase>initialize</phase>
176 <id>ant-create-script</id>
178 <exportAntProperties>true</exportAntProperties>
180 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
181 <condition property="is_windows" value="true">
182 <os family="windows"/>
184 <condition property="isLinux" value="true">
188 <equals arg1="${is_windows}" arg2="true"/>
190 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
191 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
192 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
195 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
196 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
197 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
198 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
210 <groupId>ant-contrib</groupId>
211 <artifactId>ant-contrib</artifactId>
212 <version>1.0b3</version>
215 <artifactId>ant</artifactId>
216 <groupId>ant</groupId>
223 <groupId>io.swagger</groupId>
224 <artifactId>swagger-codegen-maven-plugin</artifactId>
225 <version>2.2.1</version>
229 <goal>generate</goal>
232 <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
233 <output>${project.build.directory}/generated-sources</output>
234 <language>java</language>
236 <dateLibrary>joda</dateLibrary>
238 <library>jersey2</library>
239 <groupId>${project.groupId}</groupId>
240 <artifactId>${project.artifactId}-java-sdk</artifactId>
241 <artifactVersion>${project.version}</artifactVersion>
242 <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
243 <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
244 <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
250 <artifactId>exec-maven-plugin</artifactId>
251 <groupId>org.codehaus.mojo</groupId>
252 <version>1.5.0</version>
255 <id>swagger-generate-sources</id>
256 <phase>generate-sources</phase>
261 <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
267 <groupId>org.apache.maven.plugins</groupId>
268 <artifactId>maven-clean-plugin</artifactId>
269 <version>3.0.0</version>
272 <id>clean-generated-files</id>
273 <phase>generate-sources</phase>
280 <directory>${project.build.directory}/generated-sources</directory>
291 <groupId>org.onap.msb.swagger-sdk</groupId>
292 <artifactId>swagger-sdk</artifactId>
293 <version>1.0.0</version>
298 <dependencyManagement>
301 <groupId>org.onap.oparent</groupId>
302 <artifactId>dependencies</artifactId>
303 <version>3.3.2-SNAPSHOT</version>
305 <scope>import</scope>
308 </dependencyManagement>
313 <groupId>org.jacoco</groupId>
314 <artifactId>jacoco-maven-plugin</artifactId>
315 <version>${jacoco.version}</version>
317 <!-- Note: This exclusion list should match <sonar.exclusions>
320 <exclude>**/gen/**</exclude>
321 <exclude>**/generated-sources/**</exclude>
322 <exclude>**/yang-gen/**</exclude>
323 <exclude>**/pax/**</exclude>
328 Prepares the property pointing to the JaCoCo runtime agent which
329 is passed as VM argument when Maven the Surefire plugin is executed.
332 <id>pre-unit-test</id>
334 <goal>prepare-agent</goal>
337 <!-- Sets the path to the file which contains the execution data. -->
338 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
340 Sets the name of the property containing the settings
341 for JaCoCo runtime agent.
343 <propertyName>surefireArgLine</propertyName>
347 Ensures that the code coverage report for unit tests is created after
348 unit tests have been run.
351 <id>post-unit-test</id>
357 <!-- Sets the path to the file which contains the execution data. -->
358 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
359 <!-- Sets the output directory for the code coverage report. -->
360 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
364 <id>pre-integration-test</id>
365 <phase>pre-integration-test</phase>
367 <goal>prepare-agent</goal>
370 <!-- Sets the path to the file which contains the execution data. -->
371 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
373 Sets the name of the property containing the settings
374 for JaCoCo runtime agent.
376 <propertyName>failsafeArgLine</propertyName>
380 Ensures that the code coverage report for integration tests after
381 integration tests have been run.
384 <id>post-integration-test</id>
385 <phase>post-integration-test</phase>
390 <!-- Sets the path to the file which contains the execution data. -->
391 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
392 <!-- Sets the output directory for the code coverage report. -->
393 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
399 <groupId>org.apache.maven.plugins</groupId>
400 <artifactId>maven-surefire-plugin</artifactId>
401 <version>3.0.0-M4</version>
403 <!-- Sets the VM argument line used when unit tests are run. -->
404 <argLine>${surefireArgLine}</argLine>
405 <!-- Excludes integration tests when unit tests are run. -->
407 <exclude>**/IT*.java</exclude>
412 <groupId>org.apache.maven.plugins</groupId>
413 <artifactId>maven-failsafe-plugin</artifactId>
414 <version>3.0.0-M4</version>
417 Ensures that both integration-test and verify goals of the Failsafe Maven
421 <id>integration-tests</id>
423 <goal>integration-test</goal>
427 <!-- Sets the VM argument line used when integration tests are run. -->
428 <argLine>${failsafeArgLine}</argLine>
433 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
435 <groupId>org.sonarsource.scanner.maven</groupId>
436 <artifactId>sonar-maven-plugin</artifactId>
437 <version>${sonar.scanner.version}</version>
440 <groupId>org.apache.maven.plugins</groupId>
441 <artifactId>maven-checkstyle-plugin</artifactId>
442 <version>3.1.1</version>
445 <groupId>com.puppycrawl.tools</groupId>
446 <artifactId>checkstyle</artifactId>
447 <version>8.43</version>
455 <artifactId>maven-checkstyle-plugin</artifactId>
458 <groupId>org.onap.oparent</groupId>
459 <artifactId>checkstyle</artifactId>
460 <version>3.3.2-SNAPSHOT</version>
465 <id>onap-license</id>
469 <phase>process-sources</phase>
471 <configLocation>onap-checkstyle/check-license.xml</configLocation>
472 <includeResources>false</includeResources>
473 <includeTestSourceDirectory>true</includeTestSourceDirectory>
474 <includeTestResources>false</includeTestResources>
476 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
480 <consoleOutput>true</consoleOutput>
481 <failOnViolation>false</failOnViolation>
485 <id>onap-java-style</id>
489 <phase>process-sources</phase>
491 <!-- Use Google Java Style Guide:
492 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
493 with minor changes -->
494 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
495 <!-- <sourceDirectories> is needed so that checkstyle ignores the generated sources directory -->
497 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
499 <includeResources>true</includeResources>
500 <includeTestSourceDirectory>true</includeTestSourceDirectory>
501 <includeTestResources>true</includeTestResources>
504 <consoleOutput>true</consoleOutput>
505 <failOnViolation>false</failOnViolation>
511 <groupId>org.codehaus.mojo</groupId>
512 <artifactId>build-helper-maven-plugin</artifactId>
513 <version>1.12</version>
515 <!-- Jacoco / Sonar -->
517 <groupId>org.jacoco</groupId>
518 <artifactId>jacoco-maven-plugin</artifactId>
521 <groupId>org.apache.maven.plugins</groupId>
522 <artifactId>maven-surefire-plugin</artifactId>
525 <groupId>org.apache.maven.plugins</groupId>
526 <artifactId>maven-failsafe-plugin</artifactId>