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>
19 <groupId>org.onap.oparent</groupId>
20 <artifactId>oparent-odlparent</artifactId>
21 <version>1.1.0-SNAPSHOT</version>
22 <name>oparent-carbon</name>
23 <packaging>pom</packaging>
25 <groupId>org.opendaylight.odlparent</groupId>
26 <artifactId>odlparent</artifactId>
27 <version>1.8.1-Carbon</version>
31 <!--- properties from oparent/version -->
32 <maven.compiler.source>1.8</maven.compiler.source>
33 <maven.compiler.target>1.8</maven.compiler.target>
34 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
35 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
36 <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
37 <!-- sitePath may be overridden in the inheriting POM if desired -->
38 <sitePath>/content/sites/site/${project.groupId}/${project.artifactId}/${project.version}</sitePath>
39 <!--- end of properties from oparent/version -->
40 <jacoco.version>0.7.7.201606060606</jacoco.version>
41 <sonar-jacoco-listeners.version>3.2</sonar-jacoco-listeners.version>
42 <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
43 <!-- Default Sonar configuration -->
44 <sonar.jacoco.reportPath>target/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath>
45 <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
46 <!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
47 <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
48 <!-- If following file exist, auto-generation of swagger.json will be done -->
49 <swagger-properties>${basedir}/src/main/resources/swagger.properties</swagger-properties>
51 <!-- If following file exist, auto-generation of sdk will be done -->
52 <swagger-json>${basedir}/src/main/resources/swagger.json</swagger-json>
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>
166 <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath" />
167 <condition property="is_windows" value="true">
168 <os family="windows"/>
170 <condition property="isLinux" value="true">
174 <equals arg1="${is_windows}" arg2="true" />
176 <property name="swagger.sdk.script.file" value="generated-source-script.bat"/>
177 <echo file="${project.build.directory}${file.separator}generated-source-script.bat"
178 append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}" />
179 <echo file="${project.build.directory}${file.separator}generated-source-script.bat"
180 append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}" />
183 <property name="swagger.sdk.script.file" value="generated-source-script.sh"/>
184 <echo file="${project.build.directory}${file.separator}generated-source-script.sh"
185 append="true" message="cd ${project.build.directory}${file.separator}generated-sources${line.separator}" />
186 <echo file="${project.build.directory}${file.separator}generated-source-script.sh"
187 append="true" message="mvn clean install -Dmaven.test.skip=true${line.separator}" />
188 <chmod file="${project.build.directory}${file.separator}generated-source-script.sh" perm="755"/>
200 <groupId>ant-contrib</groupId>
201 <artifactId>ant-contrib</artifactId>
202 <version>1.0b3</version>
205 <artifactId>ant</artifactId>
206 <groupId>ant</groupId>
213 <groupId>io.swagger</groupId>
214 <artifactId>swagger-codegen-maven-plugin</artifactId>
215 <version>2.2.1</version>
219 <goal>generate</goal>
222 <inputSpec>${basedir}/src/main/resources/swagger.json</inputSpec>
223 <output>${project.build.directory}/generated-sources</output>
224 <language>java</language>
226 <dateLibrary>joda</dateLibrary>
228 <library>jersey2</library>
229 <groupId>${project.groupId}</groupId>
230 <artifactId>${project.artifactId}-java-sdk</artifactId>
231 <artifactVersion>${project.version}</artifactVersion>
232 <modelPackage>${project.groupId}.${project.artifactId}.client.model</modelPackage>
233 <apiPackage>${project.groupId}.${project.artifactId}.client.api</apiPackage>
234 <invokerPackage>${project.groupId}.${project.artifactId}.client.invoker</invokerPackage>
240 <artifactId>exec-maven-plugin</artifactId>
241 <groupId>org.codehaus.mojo</groupId>
242 <version>1.5.0</version>
245 <id>swagger-generate-sources</id>
246 <phase>generate-sources</phase>
251 <executable>${project.build.directory}${file.separator}${swagger.sdk.script.file}</executable>
257 <groupId>org.apache.maven.plugins</groupId>
258 <artifactId>maven-clean-plugin</artifactId>
259 <version>3.0.0</version>
262 <id>clean-generated-files</id>
263 <phase>generate-sources</phase>
270 <directory>${project.build.directory}/generated-sources</directory>
281 <groupId>org.onap.msb.swagger-sdk</groupId>
282 <artifactId>swagger-sdk</artifactId>
283 <version>1.0.0</version>
288 <distributionManagement>
290 <id>ecomp-releases</id>
291 <url>${onap.nexus.url}/content/repositories/releases</url>
294 <id>ecomp-snapshots</id>
295 <url>${onap.nexus.url}/content/repositories/snapshots</url>
296 </snapshotRepository>
297 </distributionManagement>
301 <!-- plugins from oparent/version -->
303 <groupId>org.sonatype.plugins</groupId>
304 <artifactId>nexus-staging-maven-plugin</artifactId>
305 <version>1.6.7</version>
306 <extensions>true</extensions>
308 <nexusUrl>${onap.nexus.url}</nexusUrl>
309 <stagingProfileId>176c31dfe190a</stagingProfileId>
310 <serverId>ecomp-staging</serverId>
314 <groupId>org.apache.maven.plugins</groupId>
315 <artifactId>maven-deploy-plugin</artifactId>
316 <!-- This version supports the "deployAtEnd" parameter -->
317 <version>2.8</version>
323 <groupId>org.apache.maven.plugins</groupId>
324 <artifactId>maven-site-plugin</artifactId>
325 <version>3.6</version>
328 <groupId>org.apache.maven.wagon</groupId>
329 <artifactId>wagon-webdav-jackrabbit</artifactId>
330 <version>2.10</version>
334 <!-- end of plugins from oparent/version -->
336 <artifactId>maven-checkstyle-plugin</artifactId>
337 <version>2.17</version>
340 <groupId>org.onap.oparent</groupId>
341 <artifactId>checkstyle</artifactId>
342 <version>1.1.0-SNAPSHOT</version>
347 <id>check-license</id>
351 <phase>process-sources</phase>
353 <configLocation>onap-checkstyle/check-license.xml</configLocation>
354 <headerLocation>onap-checkstyle/apache-license-2.regexp.txt</headerLocation>
355 <includeResources>false</includeResources>
356 <includeTestSourceDirectory>true</includeTestSourceDirectory>
357 <includeTestResources>false</includeTestResources>
358 <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
361 <failsOnError>false</failsOnError>
362 <consoleOutput>true</consoleOutput>
370 <phase>process-sources</phase>
372 <!-- Use Google Java Style Guide:
373 https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
374 with minor changes -->
375 <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
376 <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
377 <sourceDirectory>${project.build.sourceDirectory}/src/main/java</sourceDirectory>
378 <includeResources>true</includeResources>
379 <includeTestSourceDirectory>true</includeTestSourceDirectory>
380 <includeTestResources>true</includeTestResources>
383 <failsOnError>false</failsOnError>
384 <consoleOutput>true</consoleOutput>
390 <groupId>org.jacoco</groupId>
391 <artifactId>jacoco-maven-plugin</artifactId>
392 <version>${jacoco.version}</version>
394 <!-- Note: This exclusion list should match <sonar.exclusions>
397 <exclude>**/gen/**</exclude>
398 <exclude>**/generated-sources/**</exclude>
399 <exclude>**/yang-gen/**</exclude>
400 <exclude>**/pax/**</exclude>
405 Prepares the property pointing to the JaCoCo runtime agent which
406 is passed as VM argument when Maven the Surefire plugin is executed.
409 <id>pre-unit-test</id>
411 <goal>prepare-agent</goal>
414 <!-- Sets the path to the file which contains the execution data. -->
415 <destFile>${project.build.directory}/code-coverage/jacoco-ut.exec</destFile>
417 Sets the name of the property containing the settings
418 for JaCoCo runtime agent.
420 <propertyName>surefireArgLine</propertyName>
424 Ensures that the code coverage report for unit tests is created after
425 unit tests have been run.
428 <id>post-unit-test</id>
434 <!-- Sets the path to the file which contains the execution data. -->
435 <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
436 <!-- Sets the output directory for the code coverage report. -->
437 <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
441 <id>pre-integration-test</id>
442 <phase>pre-integration-test</phase>
444 <goal>prepare-agent</goal>
447 <!-- Sets the path to the file which contains the execution data. -->
448 <destFile>${project.build.directory}/code-coverage/jacoco-it.exec</destFile>
450 Sets the name of the property containing the settings
451 for JaCoCo runtime agent.
453 <propertyName>failsafeArgLine</propertyName>
457 Ensures that the code coverage report for integration tests after
458 integration tests have been run.
461 <id>post-integration-test</id>
462 <phase>post-integration-test</phase>
467 <!-- Sets the path to the file which contains the execution data. -->
468 <dataFile>${project.build.directory}/code-coverage/jacoco-it.exec</dataFile>
469 <!-- Sets the output directory for the code coverage report. -->
470 <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
476 <groupId>org.apache.maven.plugins</groupId>
477 <artifactId>maven-surefire-plugin</artifactId>
478 <version>2.19.1</version>
480 <!-- Sets the VM argument line used when unit tests are run. -->
481 <argLine>${surefireArgLine}</argLine>
482 <!-- Excludes integration tests when unit tests are run. -->
484 <exclude>**/IT*.java</exclude>
489 <groupId>org.apache.maven.plugins</groupId>
490 <artifactId>maven-failsafe-plugin</artifactId>
491 <version>2.19.1</version>
494 Ensures that both integration-test and verify goals of the Failsafe Maven
498 <id>integration-tests</id>
500 <goal>integration-test</goal>
504 <!-- Sets the VM argument line used when integration tests are run. -->
505 <argLine>${failsafeArgLine}</argLine>
510 <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
512 <groupId>org.sonarsource.scanner.maven</groupId>
513 <artifactId>sonar-maven-plugin</artifactId>
514 <version>3.3.0.603</version>
520 <artifactId>maven-checkstyle-plugin</artifactId>
523 <groupId>org.codehaus.mojo</groupId>
524 <artifactId>build-helper-maven-plugin</artifactId>
525 <version>1.12</version>
527 <!-- Jacoco / Sonar -->
529 <groupId>org.jacoco</groupId>
530 <artifactId>jacoco-maven-plugin</artifactId>
533 <groupId>org.apache.maven.plugins</groupId>
534 <artifactId>maven-surefire-plugin</artifactId>
537 <groupId>org.apache.maven.plugins</groupId>
538 <artifactId>maven-failsafe-plugin</artifactId>
541 <groupId>org.sonatype.plugins</groupId>
542 <artifactId>nexus-staging-maven-plugin</artifactId>
543 <version>1.6.7</version>
544 <extensions>true</extensions>
546 <nexusUrl>${onap.nexus.url}</nexusUrl>
547 <stagingProfileId>176c31dfe190a</stagingProfileId>
548 <serverId>ecomp-staging</serverId>