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>
50 <groupId>org.onap.oparent</groupId>
51 <artifactId>version-check-maven-plugin</artifactId>
52 <version>1.0.0-SNAPSHOT</version>
57 <id>generate-json</id>
60 <exists>${swagger-properties}</exists>
63 <name>swagger-sdk.generate-json</name>
69 <groupId>org.codehaus.mojo</groupId>
70 <artifactId>properties-maven-plugin</artifactId>
71 <version>1.0.0</version>
74 <phase>initialize</phase>
76 <goal>read-project-properties</goal>
80 <file>${basedir}/src/main/resources/swagger.properties</file>
87 <groupId>com.github.kongchen</groupId>
88 <artifactId>swagger-maven-plugin</artifactId>
89 <version>3.1.4</version>
93 <locations>${api-rest-package}</locations>
94 <schemes>http,https</schemes>
95 <host>${api-host-ip}:${api-host-port}</host>
96 <basePath>${api-base-path}</basePath>
98 <title>${api-title}</title>
99 <version>${api-version}</version>
100 <description>${api-description}</description>
102 <name>${api-license}</name>
105 <swaggerDirectory>${basedir}/src/main/resources</swaggerDirectory>
111 <phase>compile</phase>
113 <goal>generate</goal>
119 <groupId>org.apache.maven.plugins</groupId>
120 <artifactId>maven-install-plugin</artifactId>
121 <version>2.3.1</version>
124 <id>install-file-id</id>
125 <phase>install</phase>
127 <goal>install-file</goal>
130 <file>${basedir}/src/main/resources/swagger.json</file>
131 <groupId>${project.groupId}</groupId>
132 <artifactId>${project.artifactId}-swagger-schema</artifactId>
133 <version>${project.version}</version>
134 <packaging>json</packaging>
143 <id>generate-sdk</id>
146 <exists>${swagger-json}</exists>
149 <name>swagger-sdk.generate-java-sdk</name>
155 <groupId>org.apache.maven.plugins</groupId>
156 <artifactId>maven-antrun-plugin</artifactId>
157 <version>1.8</version>
160 <phase>initialize</phase>
161 <id>ant-create-script</id>
163 <exportAntProperties>true</exportAntProperties>
165 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath"/>
166 <condition property="is_windows" value="true">
167 <os family="windows"/>
169 <condition property="isLinux" value="true">
173 <equals arg1="${is_windows}" arg2="true"/>
175 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
176 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
177 <echo file="${project.build.directory}${file.separator}generated-source-script.bat" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
180 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
181 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}"/>
182 <echo file="${project.build.directory}${file.separator}generated-source-script.sh" append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}"/>
183 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
195 <groupId>ant-contrib</groupId>
196 <artifactId>ant-contrib</artifactId>
197 <version>1.0b3</version>
200 <artifactId>ant</artifactId>
201 <groupId>ant</groupId>
208 <groupId>io.swagger</groupId>
209 <artifactId>swagger-codegen-maven-plugin</artifactId>
210 <version>2.2.1</version>
214 <goal>generate</goal>
217 <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
218 <output>${project.build.directory}/generated-sources</output>
219 <language>java</language>
221 <dateLibrary>joda</dateLibrary>
223 <library>jersey2</library>
224 <groupId>${project.groupId}</groupId>
225 <artifactId>${project.artifactId}-java-sdk</artifactId>
226 <artifactVersion>${project.version}</artifactVersion>
227 <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
228 <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
229 <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
235 <artifactId>exec-maven-plugin</artifactId>
236 <groupId>org.codehaus.mojo</groupId>
237 <version>1.5.0</version>
240 <id>swagger-generate-sources</id>
241 <phase>generate-sources</phase>
246 <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
252 <groupId>org.apache.maven.plugins</groupId>
253 <artifactId>maven-clean-plugin</artifactId>
254 <version>3.0.0</version>
257 <id>clean-generated-files</id>
258 <phase>generate-sources</phase>
265 <directory>${project.build.directory}/generated-sources</directory>
276 <groupId>org.onap.msb.swagger-sdk</groupId>
277 <artifactId>swagger-sdk</artifactId>
278 <version>1.0.0-SNAPSHOT</version>
287 <artifactId>maven-checkstyle-plugin</artifactId>
288 <version>2.17</version>
291 <groupId>org.onap.oparent</groupId>
292 <artifactId>checkstyle</artifactId>
293 <version>1.0.0-SNAPSHOT</version>
298 <id>check-license</id>
302 <phase>process-sources</phase>
304 <configLocation>onap-checkstyle/check-license.xml</configLocation>
305 <headerLocation>onap-checkstyle/apache-license-2.regexp.txt</headerLocation>
306 <includeResources>false</includeResources>
307 <includeTestSourceDirectory>true</includeTestSourceDirectory>
308 <includeTestResources>false</includeTestResources>
309 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
312 <failsOnError>false</failsOnError>
313 <consoleOutput>true</consoleOutput>
321 <phase>process-sources</phase>
323 <!-- Use Google Java Style Guide:
324 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
325 with minor changes -->
326 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
327 <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
328 <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
329 <includeResources>true</includeResources>
330 <includeTestSourceDirectory>true</includeTestSourceDirectory>
331 <includeTestResources>true</includeTestResources>
334 <failsOnError>false</failsOnError>
335 <consoleOutput>true</consoleOutput>
341 <groupId>org.jacoco</groupId>
342 <artifactId>jacoco-maven-plugin</artifactId>
343 <version>${jacoco.version}</version>
345 <!-- Note: This exclusion list should match <sonar.exclusions>
348 <exclude>**/gen/**</exclude>
349 <exclude>**/generated-sources/**</exclude>
350 <exclude>**/yang-gen/**</exclude>
351 <exclude>**/pax/**</exclude>
356 Prepares the property pointing to the JaCoCo runtime agent which
357 is passed as VM argument when Maven the Surefire plugin is executed.
360 <id>pre-unit-test</id>
362 <goal>prepare-agent</goal>
365 <!-- Sets the path to the file which contains the execution data. -->
366 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
368 Sets the name of the property containing the settings
369 for JaCoCo runtime agent.
371 <propertyName>surefireArgLine</propertyName>
375 Ensures that the code coverage report for unit tests is created after
376 unit tests have been run.
379 <id>post-unit-test</id>
385 <!-- Sets the path to the file which contains the execution data. -->
386 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
387 <!-- Sets the output directory for the code coverage report. -->
388 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
392 <id>pre-integration-test</id>
393 <phase>pre-integration-test</phase>
395 <goal>prepare-agent</goal>
398 <!-- Sets the path to the file which contains the execution data. -->
399 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
401 Sets the name of the property containing the settings
402 for JaCoCo runtime agent.
404 <propertyName>failsafeArgLine</propertyName>
408 Ensures that the code coverage report for integration tests after
409 integration tests have been run.
412 <id>post-integration-test</id>
413 <phase>post-integration-test</phase>
418 <!-- Sets the path to the file which contains the execution data. -->
419 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
420 <!-- Sets the output directory for the code coverage report. -->
421 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
427 <groupId>org.apache.maven.plugins</groupId>
428 <artifactId>maven-surefire-plugin</artifactId>
429 <version>2.19.1</version>
431 <!-- Sets the VM argument line used when unit tests are run. -->
432 <argLine>${surefireArgLine}</argLine>
433 <!-- Excludes integration tests when unit tests are run. -->
435 <exclude>**/IT*.java</exclude>
440 <groupId>org.apache.maven.plugins</groupId>
441 <artifactId>maven-failsafe-plugin</artifactId>
442 <version>2.19.1</version>
445 Ensures that both integration-test and verify goals of the Failsafe Maven
449 <id>integration-tests</id>
451 <goal>integration-test</goal>
455 <!-- Sets the VM argument line used when integration tests are run. -->
456 <argLine>${failsafeArgLine}</argLine>
461 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
463 <groupId>org.sonarsource.scanner.maven</groupId>
464 <artifactId>sonar-maven-plugin</artifactId>
465 <version>3.3.0.603</version>
468 <groupId>org.onap.oparent</groupId>
469 <artifactId>version-check-maven-plugin</artifactId>
470 <version>1.0.0-SNAPSHOT</version>
473 <id>version-check</id>
474 <phase>compile</phase>
476 <goal>version-check</goal>
479 <manifestUri>https://git.onap.org/integration/plain/versions/java-manifest.csv</manifestUri>
488 <artifactId>maven-checkstyle-plugin</artifactId>
491 <groupId>org.codehaus.mojo</groupId>
492 <artifactId>build-helper-maven-plugin</artifactId>
493 <version>1.12</version>
495 <!-- Jacoco / Sonar -->
497 <groupId>org.jacoco</groupId>
498 <artifactId>jacoco-maven-plugin</artifactId>
501 <groupId>org.apache.maven.plugins</groupId>
502 <artifactId>maven-surefire-plugin</artifactId>
505 <groupId>org.apache.maven.plugins</groupId>
506 <artifactId>maven-failsafe-plugin</artifactId>
509 <groupId>org.onap.oparent</groupId>
510 <artifactId>version-check-maven-plugin</artifactId>