From 8de37f9d3035b4a41e696b967f2222806c250925 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Fri, 11 Sep 2020 13:58:42 -0400 Subject: Refactoring poms groupId artifactId Issue-ID: CCSDK-2787 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Ica64f0c793beabb47950c7bf1eede63a0dbf3cea --- components/cba-parent/pom.xml | 74 ++++++++++++++++++ .../cba-assembly-descriptor/pom.xml | 5 +- components/model-catalog/blueprint-model/pom.xml | 7 +- .../test-blueprint-kotlin-parent/pom.xml | 90 +++++++++++----------- .../test-blueprint/capability_cli/pom.xml | 9 +-- .../blueprint-model/test-blueprint/pom.xml | 5 +- .../test-blueprint/resource-audit/pom.xml | 10 +-- components/pom.xml | 8 +- 8 files changed, 137 insertions(+), 71 deletions(-) create mode 100644 components/cba-parent/pom.xml (limited to 'components') diff --git a/components/cba-parent/pom.xml b/components/cba-parent/pom.xml new file mode 100644 index 000000000..f4630d8e6 --- /dev/null +++ b/components/cba-parent/pom.xml @@ -0,0 +1,74 @@ + + + + + 4.0.0 + + + org.onap.ccsdk.cds.blueprintsprocessor + blueprintsprocessor-parent + 1.0.0-SNAPSHOT + ../../ms/blueprintsprocessor/parent + + + cba-parent + pom + + Components CBA Parent + + + ${project.basedir}/Scripts/kotlin + ${project.basedir}/Tests/kotlin + + + ${project.basedir}/Environments + + + + + org.jetbrains.kotlin + kotlin-maven-plugin + + + compile + compile + + compile + + + + ${project.basedir}/Scripts/kotlin + + + + + test-compile + test-compile + + test-compile + + + + ${project.basedir}/Tests/kotlin + + + + + + + + diff --git a/components/model-catalog/blueprint-model/cba-assembly-descriptor/pom.xml b/components/model-catalog/blueprint-model/cba-assembly-descriptor/pom.xml index 084b72fc6..d8a1d689b 100644 --- a/components/model-catalog/blueprint-model/cba-assembly-descriptor/pom.xml +++ b/components/model-catalog/blueprint-model/cba-assembly-descriptor/pom.xml @@ -19,15 +19,14 @@ 4.0.0 - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba blueprint-model 1.0.0-SNAPSHOT - org.onap.ccsdk.cds.blueprintsprocessor cba-assembly-descriptor - CBA - Assembly Descriptor + Components Model Catalog - Blueprints Model - CBA Assembly Descriptor Shared assembly descriptor diff --git a/components/model-catalog/blueprint-model/pom.xml b/components/model-catalog/blueprint-model/pom.xml index 1ea99fa99..db63478cd 100644 --- a/components/model-catalog/blueprint-model/pom.xml +++ b/components/model-catalog/blueprint-model/pom.xml @@ -22,16 +22,15 @@ org.onap.ccsdk.cds.blueprintsprocessor cba-parent 1.0.0-SNAPSHOT - ../../../ms/blueprintsprocessor/cba-parent + ../../cba-parent - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba blueprint-model 1.0.0-SNAPSHOT pom - CBA - Blueprints - CBA - Blueprints + Components Model Catalog - Blueprints Model test-blueprint diff --git a/components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml b/components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml index d8c3d80bd..626ca9e17 100644 --- a/components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml +++ b/components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml @@ -19,7 +19,7 @@ 4.0.0 - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba blueprint-model 1.0.0-SNAPSHOT @@ -28,12 +28,11 @@ 1.0.0-SNAPSHOT pom - CBA - Test Kotlin scripts - CBA - Test Kotlin scripts + Components Model Catalog - Blueprints Model - Test Kotlin Parent - org.onap.ccsdk.cds.blueprintsprocessor + org.onap.ccsdk.cds.blueprintsprocessor.modules execution-service @@ -62,7 +61,6 @@ kotlinx-coroutines-test test - junit junit @@ -219,9 +217,9 @@ maven-assembly-plugin - org.onap.ccsdk.cds.blueprintsprocessor + org.onap.ccsdk.cds.components.cba cba-assembly-descriptor - 1.0.0-SNAPSHOT + ${ccsdk.cds.version} * @@ -300,61 +298,61 @@ def publishEndpoint = properties['cds.publish.endpoint'] ?: 'api/v1/blueprint-model/publish' def throwIfPropMissing(prop) { - value = properties[prop] - if (!value || "".equals(value)) { - throw new RuntimeException("Property missing: $prop") - } - return value + value = properties[prop] + if (!value || "".equals(value)) { + throw new RuntimeException("Property missing: $prop") + } + return value } def buildRequest(endpoint, fileName) { - body = new MultipartBody.Builder() - .setType(MultipartBody.FORM) - .addFormDataPart("file", - fileName, - RequestBody.create(MediaType.parse('application/zip'), new File(target, fileName))) - .build() + body = new MultipartBody.Builder() + .setType(MultipartBody.FORM) + .addFormDataPart("file", + fileName, + RequestBody.create(MediaType.parse('application/zip'), new File(target, fileName))) + .build() - return new Request.Builder() - .url("$protocol://$host:$port/$endpoint") - .addHeader('Authorization', Credentials.basic(userName, password)) - .post(body) - .build() + return new Request.Builder() + .url("$protocol://$host:$port/$endpoint") + .addHeader('Authorization', Credentials.basic(userName, password)) + .post(body) + .build() } def logAndThrow(msg) { - if(response) { - log.error(response.body().string()) - } - throw new RuntimeException(msg) + if(response) { + log.error(response.body().string()) + } + throw new RuntimeException(msg) } response = null try { - def client = new OkHttpClient() + def client = new OkHttpClient() - response = client.newCall(buildRequest(enrichEndpoint, cba)).execute() - if (!response || !response.isSuccessful()) { - logAndThrow("Failed to enrich CBA") - } + response = client.newCall(buildRequest(enrichEndpoint, cba)).execute() + if (!response || !response.isSuccessful()) { + logAndThrow("Failed to enrich CBA") + } - IOUtils.copy( - response.body().byteStream(), - new FileOutputStream(new File(target, enrichedCba)) - ) - log.info("Created enriched cba: $enrichedCba") + IOUtils.copy( + response.body().byteStream(), + new FileOutputStream(new File(target, enrichedCba)) + ) + log.info("Created enriched cba: $enrichedCba") - response = client.newCall(buildRequest(publishEndpoint, enrichedCba)).execute() - if (!response || !response.isSuccessful()) { - logAndThrow("Failed to publish CBA") - } + response = client.newCall(buildRequest(publishEndpoint, enrichedCba)).execute() + if (!response || !response.isSuccessful()) { + logAndThrow("Failed to publish CBA") + } - log.info("CBA Deployed") - log.info(response.body().string()) + log.info("CBA Deployed") + log.info(response.body().string()) } finally { - if (response) { - response.close() - } + if (response) { + response.close() + } } diff --git a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/pom.xml b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/pom.xml index ff9e8d985..e5ddd0578 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/capability_cli/pom.xml +++ b/components/model-catalog/blueprint-model/test-blueprint/capability_cli/pom.xml @@ -20,15 +20,14 @@ 4.0.0 - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba test-blueprint-model 1.0.0-SNAPSHOT capability_cli - CBA - Test Capability CLI - CBA - Test Capability CLI + Components Model Catalog - Blueprints Model - Test Blueprints - Capability CLI @@ -43,9 +42,9 @@ maven-assembly-plugin - org.onap.ccsdk.cds.blueprintsprocessor + org.onap.ccsdk.cds.components.cba cba-assembly-descriptor - 1.0.0-SNAPSHOT + ${ccsdk.cds.version} * diff --git a/components/model-catalog/blueprint-model/test-blueprint/pom.xml b/components/model-catalog/blueprint-model/test-blueprint/pom.xml index 8367d6b4b..70b3bfc1d 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/pom.xml +++ b/components/model-catalog/blueprint-model/test-blueprint/pom.xml @@ -19,7 +19,7 @@ 4.0.0 - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba blueprint-model 1.0.0-SNAPSHOT @@ -28,8 +28,7 @@ 1.0.0-SNAPSHOT pom - CBA - Test Blueprints - CBA - Test Blueprints + Components Model Catalog - Blueprints Model - Test Blueprints capability_cli diff --git a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/pom.xml b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/pom.xml index 3edcf0aaf..7118355d3 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/resource-audit/pom.xml +++ b/components/model-catalog/blueprint-model/test-blueprint/resource-audit/pom.xml @@ -20,16 +20,14 @@ 4.0.0 - org.onap.ccsdk.cds.cba + org.onap.ccsdk.cds.components.cba test-blueprint-model 1.0.0-SNAPSHOT - org.onap.ccsdk.cds.components.cba resource-audit - CBA - Test Resource Audit - CBA - Test Resource Audit + Components Model Catalog - Blueprints Model - Test Blueprints - Resource Audit @@ -45,9 +43,9 @@ 3.1.0 - org.onap.ccsdk.cds.blueprintsprocessor + org.onap.ccsdk.cds.components.cba cba-assembly-descriptor - 1.0.0-SNAPSHOT + ${ccsdk.cds.version} * diff --git a/components/pom.xml b/components/pom.xml index 184c2cac8..64bc46edd 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -20,19 +20,19 @@ org.onap.ccsdk.cds - parent + cds-aggregator 1.0.0-SNAPSHOT .. - components + cds-components 1.0.0-SNAPSHOT pom - Components Root - Components + Components (Root) + cba-parent model-catalog/blueprint-model -- cgit 1.2.3-korg