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.
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
19 <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">
20 <modelVersion>4.0.0</modelVersion>
22 <groupId>org.onap.oparent</groupId>
23 <artifactId>version</artifactId>
24 <version>3.1.0-SNAPSHOT</version>
25 <relativePath>..</relativePath>
27 <artifactId>oparent</artifactId>
28 <name>oparent/oparent</name>
29 <packaging>pom</packaging>
31 <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
32 <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
34 <url>https://wiki.onap.org/display/DW/Integration+Project</url>
37 <jacoco.version>0.8.5</jacoco.version>
38 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
39 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
40 <!-- Default Sonar configuration -->
41 <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
42 <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
43 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
44 <!-- If following file exist, auto-generation of swagger.json will be done -->
45 <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
46 <!-- If following file exist, auto-generation of sdk will be done -->
47 <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
55 <groupId>org.owasp</groupId>
56 <artifactId>dependency-check-maven</artifactId>
57 <version>5.3.2</version>
71 <id>generate-json</id>
74 <exists>${swagger-properties}</exists>
77 <name>swagger-sdk.generate-json</name>
83 <groupId>org.codehaus.mojo</groupId>
84 <artifactId>properties-maven-plugin</artifactId>
85 <version>1.0.0</version>
88 <phase>initialize</phase>
90 <goal>read-project-properties</goal>
94 <file>${basedir}/src/main/resources/swagger.properties</file>
101 <groupId>com.github.kongchen</groupId>
102 <artifactId>swagger-maven-plugin</artifactId>
103 <version>3.1.4</version>
107 <locations>${api-rest-package}</locations>
108 <schemes>http,https</schemes>
109 <host>${api-host-ip}:${api-host-port}</host>
110 <basePath>${api-base-path}</basePath>
112 <title>${api-title}</title>
113 <version>${api-version}</version>
114 <description>${api-description}</description>
116 <name>${api-license}</name>
119 <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
125 <phase>compile</phase>
127 <goal>generate</goal>
133 <groupId>org.apache.maven.plugins</groupId>
134 <artifactId>maven-install-plugin</artifactId>
135 <version>2.3.1</version>
138 <id>install-file-id</id>
139 <phase>install</phase>
141 <goal>install-file</goal>
144 <file>${basedir}/src/main/resources/swagger.json</file>
145 <groupId>${project.groupId}</groupId>
146 <artifactId>${project.artifactId}-swagger-schema</artifactId>
147 <version>${project.version}</version>
148 <packaging>json</packaging>
157 <id>generate-sdk</id>
160 <exists>${swagger-json}</exists>
163 <name>swagger-sdk.generate-java-sdk</name>
169 <groupId>org.apache.maven.plugins</groupId>
170 <artifactId>maven-antrun-plugin</artifactId>
171 <version>1.8</version>
174 <phase>initialize</phase>
175 <id>ant-create-script</id>
177 <exportAntProperties>true</exportAntProperties>
179 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
180 <condition property="is_windows" value="true">
181 <os family="windows"/>
183 <condition property="isLinux" value="true">
187 <equals arg1="${is_windows}" arg2="true"/>
189 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
190 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
191 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
194 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
195 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
196 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
197 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
209 <groupId>ant-contrib</groupId>
210 <artifactId>ant-contrib</artifactId>
211 <version>1.0b3</version>
214 <artifactId>ant</artifactId>
215 <groupId>ant</groupId>
222 <groupId>io.swagger</groupId>
223 <artifactId>swagger-codegen-maven-plugin</artifactId>
224 <version>2.2.1</version>
228 <goal>generate</goal>
231 <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
232 <output>${project.build.directory}/generated-sources</output>
233 <language>java</language>
235 <dateLibrary>joda</dateLibrary>
237 <library>jersey2</library>
238 <groupId>${project.groupId}</groupId>
239 <artifactId>${project.artifactId}-java-sdk</artifactId>
240 <artifactVersion>${project.version}</artifactVersion>
241 <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
242 <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
243 <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
249 <artifactId>exec-maven-plugin</artifactId>
250 <groupId>org.codehaus.mojo</groupId>
251 <version>1.5.0</version>
254 <id>swagger-generate-sources</id>
255 <phase>generate-sources</phase>
260 <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
266 <groupId>org.apache.maven.plugins</groupId>
267 <artifactId>maven-clean-plugin</artifactId>
268 <version>3.0.0</version>
271 <id>clean-generated-files</id>
272 <phase>generate-sources</phase>
279 <directory>${project.build.directory}/generated-sources</directory>
290 <groupId>org.onap.msb.swagger-sdk</groupId>
291 <artifactId>swagger-sdk</artifactId>
292 <version>1.0.0</version>
297 <dependencyManagement>
300 <groupId>org.onap.oparent</groupId>
301 <artifactId>dependencies</artifactId>
302 <version>3.1.0-SNAPSHOT</version>
304 <scope>import</scope>
307 </dependencyManagement>
312 <groupId>org.jacoco</groupId>
313 <artifactId>jacoco-maven-plugin</artifactId>
314 <version>${jacoco.version}</version>
316 <!-- Note: This exclusion list should match <sonar.exclusions>
319 <exclude>**/gen/**</exclude>
320 <exclude>**/generated-sources/**</exclude>
321 <exclude>**/yang-gen/**</exclude>
322 <exclude>**/pax/**</exclude>
327 Prepares the property pointing to the JaCoCo runtime agent which
328 is passed as VM argument when Maven the Surefire plugin is executed.
331 <id>pre-unit-test</id>
333 <goal>prepare-agent</goal>
336 <!-- Sets the path to the file which contains the execution data. -->
337 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
339 Sets the name of the property containing the settings
340 for JaCoCo runtime agent.
342 <propertyName>surefireArgLine</propertyName>
346 Ensures that the code coverage report for unit tests is created after
347 unit tests have been run.
350 <id>post-unit-test</id>
356 <!-- Sets the path to the file which contains the execution data. -->
357 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
358 <!-- Sets the output directory for the code coverage report. -->
359 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
363 <id>pre-integration-test</id>
364 <phase>pre-integration-test</phase>
366 <goal>prepare-agent</goal>
369 <!-- Sets the path to the file which contains the execution data. -->
370 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
372 Sets the name of the property containing the settings
373 for JaCoCo runtime agent.
375 <propertyName>failsafeArgLine</propertyName>
379 Ensures that the code coverage report for integration tests after
380 integration tests have been run.
383 <id>post-integration-test</id>
384 <phase>post-integration-test</phase>
389 <!-- Sets the path to the file which contains the execution data. -->
390 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
391 <!-- Sets the output directory for the code coverage report. -->
392 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
398 <groupId>org.apache.maven.plugins</groupId>
399 <artifactId>maven-surefire-plugin</artifactId>
400 <version>3.0.0-M4</version>
402 <!-- Sets the VM argument line used when unit tests are run. -->
403 <argLine>${surefireArgLine}</argLine>
404 <!-- Excludes integration tests when unit tests are run. -->
406 <exclude>**/IT*.java</exclude>
411 <groupId>org.apache.maven.plugins</groupId>
412 <artifactId>maven-failsafe-plugin</artifactId>
413 <version>3.0.0-M4</version>
416 Ensures that both integration-test and verify goals of the Failsafe Maven
420 <id>integration-tests</id>
422 <goal>integration-test</goal>
426 <!-- Sets the VM argument line used when integration tests are run. -->
427 <argLine>${failsafeArgLine}</argLine>
432 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
434 <groupId>org.sonarsource.scanner.maven</groupId>
435 <artifactId>sonar-maven-plugin</artifactId>
436 <version>${sonar.scanner.version}</version>
439 <groupId>org.apache.maven.plugins</groupId>
440 <artifactId>maven-checkstyle-plugin</artifactId>
441 <version>3.1.1</version>
444 <groupId>com.puppycrawl.tools</groupId>
445 <artifactId>checkstyle</artifactId>
446 <version>8.32</version>
454 <artifactId>maven-checkstyle-plugin</artifactId>
457 <groupId>org.onap.oparent</groupId>
458 <artifactId>checkstyle</artifactId>
459 <version>3.1.0-SNAPSHOT</version>
464 <id>onap-license</id>
468 <phase>process-sources</phase>
470 <configLocation>onap-checkstyle/check-license.xml</configLocation>
471 <includeResources>false</includeResources>
472 <includeTestSourceDirectory>true</includeTestSourceDirectory>
473 <includeTestResources>false</includeTestResources>
475 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
479 <consoleOutput>true</consoleOutput>
480 <failOnViolation>false</failOnViolation>
484 <id>onap-java-style</id>
488 <phase>process-sources</phase>
490 <!-- Use Google Java Style Guide:
491 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
492 with minor changes -->
493 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
494 <!-- <sourceDirectories> is needed so that checkstyle ignores the generated sources directory -->
496 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
498 <includeResources>true</includeResources>
499 <includeTestSourceDirectory>true</includeTestSourceDirectory>
500 <includeTestResources>true</includeTestResources>
503 <consoleOutput>true</consoleOutput>
504 <failOnViolation>false</failOnViolation>
510 <groupId>org.codehaus.mojo</groupId>
511 <artifactId>build-helper-maven-plugin</artifactId>
512 <version>1.12</version>
514 <!-- Jacoco / Sonar -->
516 <groupId>org.jacoco</groupId>
517 <artifactId>jacoco-maven-plugin</artifactId>
520 <groupId>org.apache.maven.plugins</groupId>
521 <artifactId>maven-surefire-plugin</artifactId>
524 <groupId>org.apache.maven.plugins</groupId>
525 <artifactId>maven-failsafe-plugin</artifactId>