1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2016-2017 Huawei Technologies Co., Ltd.
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
17 <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">
18 <modelVersion>4.0.0</modelVersion>
20 <groupId>org.onap.oparent</groupId>
21 <artifactId>version</artifactId>
22 <version>1.0.0-SNAPSHOT</version>
23 <relativePath>..</relativePath>
25 <artifactId>oparent</artifactId>
26 <name>oparent/oparent</name>
27 <packaging>pom</packaging>
29 <connection>scm:git:ssh://git.onap.org:29418/oparent.git</connection>
30 <developerConnection>scm:git:ssh://git.onap.org:29418/oparent.git</developerConnection>
32 <url>https://wiki.onap.org/display/DW/Integration+Project</url>
35 <jacoco.version>0.7.7.201606060606</jacoco.version>
36 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
37 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
38 <!-- Default Sonar configuration -->
39 <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
40 <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
41 <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
42 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
43 <!-- If following file exist, auto-generation of swagger.json will be done -->
44 <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
45 <!-- If following file exist, auto-generation of sdk will be done -->
46 <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
51 <name>Maven 2 repository 2</name>
52 <url>http://repo2.maven.org/maven2/</url>
55 <id>ecomp-releases</id>
56 <name>ONAP Release Repository</name>
57 <url>https://nexus.onap.org/content/repositories/releases/</url>
60 <id>ecomp-snapshots</id>
61 <name>ONAP Snapshot Repository</name>
62 <url>https://nexus.onap.org/content/repositories/snapshots/</url>
64 <enabled>true</enabled>
67 <enabled>false</enabled>
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-SNAPSHOT</version>
303 <artifactId>maven-checkstyle-plugin</artifactId>
304 <version>2.17</version>
307 <groupId>org.onap.oparent</groupId>
308 <artifactId>checkstyle</artifactId>
309 <version>1.0.0-SNAPSHOT</version>
314 <id>check-license</id>
318 <phase>process-sources</phase>
320 <configLocation>onap-checkstyle/check-license.xml</configLocation>
321 <includeResources>false</includeResources>
322 <includeTestSourceDirectory>true</includeTestSourceDirectory>
323 <includeTestResources>false</includeTestResources>
324 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
327 <consoleOutput>true</consoleOutput>
328 <failsOnViolation>false</failsOnViolation>
336 <phase>process-sources</phase>
338 <!-- Use Google Java Style Guide:
339 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
340 with minor changes -->
341 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
342 <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
343 <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
344 <includeResources>true</includeResources>
345 <includeTestSourceDirectory>true</includeTestSourceDirectory>
346 <includeTestResources>true</includeTestResources>
349 <consoleOutput>true</consoleOutput>
350 <failsOnViolation>false</failsOnViolation>
356 <groupId>org.jacoco</groupId>
357 <artifactId>jacoco-maven-plugin</artifactId>
358 <version>${jacoco.version}</version>
360 <!-- Note: This exclusion list should match <sonar.exclusions>
363 <exclude>**/gen/**</exclude>
364 <exclude>**/generated-sources/**</exclude>
365 <exclude>**/yang-gen/**</exclude>
366 <exclude>**/pax/**</exclude>
371 Prepares the property pointing to the JaCoCo runtime agent which
372 is passed as VM argument when Maven the Surefire plugin is executed.
375 <id>pre-unit-test</id>
377 <goal>prepare-agent</goal>
380 <!-- Sets the path to the file which contains the execution data. -->
381 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
383 Sets the name of the property containing the settings
384 for JaCoCo runtime agent.
386 <propertyName>surefireArgLine</propertyName>
390 Ensures that the code coverage report for unit tests is created after
391 unit tests have been run.
394 <id>post-unit-test</id>
400 <!-- Sets the path to the file which contains the execution data. -->
401 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
402 <!-- Sets the output directory for the code coverage report. -->
403 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
407 <id>pre-integration-test</id>
408 <phase>pre-integration-test</phase>
410 <goal>prepare-agent</goal>
413 <!-- Sets the path to the file which contains the execution data. -->
414 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
416 Sets the name of the property containing the settings
417 for JaCoCo runtime agent.
419 <propertyName>failsafeArgLine</propertyName>
423 Ensures that the code coverage report for integration tests after
424 integration tests have been run.
427 <id>post-integration-test</id>
428 <phase>post-integration-test</phase>
433 <!-- Sets the path to the file which contains the execution data. -->
434 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
435 <!-- Sets the output directory for the code coverage report. -->
436 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
442 <groupId>org.apache.maven.plugins</groupId>
443 <artifactId>maven-surefire-plugin</artifactId>
444 <version>2.19.1</version>
446 <!-- Sets the VM argument line used when unit tests are run. -->
447 <argLine>${surefireArgLine}</argLine>
448 <!-- Excludes integration tests when unit tests are run. -->
450 <exclude>**/IT*.java</exclude>
455 <groupId>org.apache.maven.plugins</groupId>
456 <artifactId>maven-failsafe-plugin</artifactId>
457 <version>2.19.1</version>
460 Ensures that both integration-test and verify goals of the Failsafe Maven
464 <id>integration-tests</id>
466 <goal>integration-test</goal>
470 <!-- Sets the VM argument line used when integration tests are run. -->
471 <argLine>${failsafeArgLine}</argLine>
476 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
478 <groupId>org.sonarsource.scanner.maven</groupId>
479 <artifactId>sonar-maven-plugin</artifactId>
480 <version>3.3.0.603</version>
486 <artifactId>maven-checkstyle-plugin</artifactId>
489 <groupId>org.codehaus.mojo</groupId>
490 <artifactId>build-helper-maven-plugin</artifactId>
491 <version>1.12</version>
493 <!-- Jacoco / Sonar -->
495 <groupId>org.jacoco</groupId>
496 <artifactId>jacoco-maven-plugin</artifactId>
499 <groupId>org.apache.maven.plugins</groupId>
500 <artifactId>maven-surefire-plugin</artifactId>
503 <groupId>org.apache.maven.plugins</groupId>
504 <artifactId>maven-failsafe-plugin</artifactId>