From fc3e465494fa354de2a74675a5127fc6446780e5 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Fri, 11 Aug 2017 10:37:12 +0530 Subject: Add seed code for swagger-sdk Add required mvn setting for generating swagger json and service java sdk automatically Change-Id: I632b46ed5d234582b9cfcf9d4ff1409873d1a050 Issue-Id: MSB-14 Signed-off-by: Kanagaraj Manickam k00365106 --- pom.xml | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 265 insertions(+), 26 deletions(-) diff --git a/pom.xml b/pom.xml index b6e3637..e6f1280 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,246 @@ target/code-coverage/jacoco-it.exec **/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/** + + ${basedir}/src/main/resources/swagger.properties + + + ${basedir}/src/main/resources/swagger.json + + + + generate-json + + + ${swagger-properties} + + + swagger-sdk.generate-json + + + + + + org.codehaus.mojo + properties-maven-plugin + 1.0.0 + + + initialize + + read-project-properties + + + + ${basedir}/src/main/resources/swagger.properties + + + + + + + com.github.kongchen + swagger-maven-plugin + 3.1.4 + + + + ${api-rest-package} + http,https + ${api-host-ip}:${api-host-port} + ${api-base-path} + + ${api-title} + ${api-version} + ${api-description} + + ${api-license} + + + ${basedir}/src/main/resources + + + + + + compile + + generate + + + + + + org.apache.maven.plugins + maven-install-plugin + 2.3.1 + + + install-file-id + install + + install-file + + + ${basedir}/src/main/resources/swagger.json + ${project.groupId} + ${project.artifactId}-swagger-schema + ${project.version} + json + + + + + + + + + generate-sdk + + + ${swagger-json} + + + swagger-sdk.generate-java-sdk + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + initialize + ant-create-script + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + ant-contrib + ant-contrib + 1.0b3 + + + ant + ant + + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.1 + + + + generate + + + ${basedir}/src/main/resources/swagger.json + ${project.build.directory}/generated-sources + java + + joda + + jersey2 + ${project.groupId} + ${project.artifactId}-java-sdk + ${project.version} + ${project.groupId}.${project.artifactId}.client.model + ${project.groupId}.${project.artifactId}.client.api + ${project.groupId}.${project.artifactId}.client.invoker + + + + + + exec-maven-plugin + org.codehaus.mojo + 1.5.0 + + + swagger-generate-sources + generate-sources + + exec + + + ${project.build.directory}${file.separator}${swagger.sdk.script.file} + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.0.0 + + + clean-generated-files + generate-sources + + clean + + + + + ${project.build.directory}/generated-sources + + + + + + + + + + + org.onap.msb.swagger-sdk + swagger-sdk + 1.0.0-SNAPSHOT + + + + @@ -66,7 +305,7 @@ - onap-java-style.xml @@ -116,7 +355,7 @@ ${jacoco.version} + property above --> **/gen/** **/generated-sources/** @@ -126,9 +365,9 @@ + Prepares the property pointing to the JaCoCo runtime agent which + is passed as VM argument when Maven the Surefire plugin is executed. + --> pre-unit-test @@ -138,16 +377,16 @@ ${project.build.directory}/code-coverage/jacoco-ut.exec + Sets the name of the property containing the settings + for JaCoCo runtime agent. + --> surefireArgLine + Ensures that the code coverage report for unit tests is created after + unit tests have been run. + --> post-unit-test test @@ -171,16 +410,16 @@ ${project.build.directory}/code-coverage/jacoco-it.exec + Sets the name of the property containing the settings + for JaCoCo runtime agent. + --> failsafeArgLine + Ensures that the code coverage report for integration tests after + integration tests have been run. + --> post-integration-test post-integration-test @@ -215,9 +454,9 @@ 2.19.1 + Ensures that both integration-test and verify goals of the Failsafe Maven + plugin are executed. + --> integration-tests @@ -231,12 +470,12 @@ - - - org.sonarsource.scanner.maven - sonar-maven-plugin - 3.3.0.603 - + + + org.sonarsource.scanner.maven + sonar-maven-plugin + 3.3.0.603 + -- cgit 1.2.3-korg