diff options
author | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-11 13:58:42 -0400 |
---|---|---|
committer | Singal, Kapil (ks220y) <ks220y@att.com> | 2020-09-11 19:13:55 -0400 |
commit | 8de37f9d3035b4a41e696b967f2222806c250925 (patch) | |
tree | bbead8f9844c301d86966fdddd82b677abe13f75 /components | |
parent | 8c23129be8bef8f2113be25eca424f87eb05c889 (diff) |
Refactoring poms groupId artifactId
Issue-ID: CCSDK-2787
Signed-off-by: Singal, Kapil (ks220y) <ks220y@att.com>
Change-Id: Ica64f0c793beabb47950c7bf1eede63a0dbf3cea
Diffstat (limited to 'components')
8 files changed, 137 insertions, 71 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Copyright © 2019 IBM. + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> + <artifactId>blueprintsprocessor-parent</artifactId> + <version>1.0.0-SNAPSHOT</version> + <relativePath>../../ms/blueprintsprocessor/parent</relativePath> + </parent> + + <artifactId>cba-parent</artifactId> + <packaging>pom</packaging> + + <name>Components CBA Parent</name> + + <build> + <sourceDirectory>${project.basedir}/Scripts/kotlin</sourceDirectory> + <testSourceDirectory>${project.basedir}/Tests/kotlin</testSourceDirectory> + <resources> + <resource> + <directory>${project.basedir}/Environments</directory> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-maven-plugin</artifactId> + <executions> + <execution> + <id>compile</id> + <phase>compile</phase> + <goals> + <goal>compile</goal> + </goals> + <configuration> + <sourceDirs> + <sourceDir>${project.basedir}/Scripts/kotlin</sourceDir> + </sourceDirs> + </configuration> + </execution> + <execution> + <id>test-compile</id> + <phase>test-compile</phase> + <goals> + <goal>test-compile</goal> + </goals> + <configuration> + <sourceDirs> + <sourceDir>${project.basedir}/Tests/kotlin</sourceDir> + </sourceDirs> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> 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 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> - <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> <artifactId>cba-assembly-descriptor</artifactId> - <name>CBA - Assembly Descriptor</name> + <name>Components Model Catalog - Blueprints Model - CBA Assembly Descriptor</name> <description>Shared assembly descriptor</description> <build> 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 @@ <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> <artifactId>cba-parent</artifactId> <version>1.0.0-SNAPSHOT</version> - <relativePath>../../../ms/blueprintsprocessor/cba-parent</relativePath> + <relativePath>../../cba-parent</relativePath> </parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>CBA - Blueprints</name> - <description>CBA - Blueprints</description> + <name>Components Model Catalog - Blueprints Model</name> <modules> <module>test-blueprint</module> 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 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> @@ -28,12 +28,11 @@ <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>CBA - Test Kotlin scripts</name> - <description>CBA - Test Kotlin scripts</description> + <name>Components Model Catalog - Blueprints Model - Test Kotlin Parent</name> <dependencies> <dependency> - <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> + <groupId>org.onap.ccsdk.cds.blueprintsprocessor.modules</groupId> <artifactId>execution-service</artifactId> </dependency> <dependency> @@ -62,7 +61,6 @@ <artifactId>kotlinx-coroutines-test</artifactId> <scope>test</scope> </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -219,9 +217,9 @@ <artifactId>maven-assembly-plugin</artifactId> <dependencies> <dependency> - <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>cba-assembly-descriptor</artifactId> - <version>1.0.0-SNAPSHOT</version> + <version>${ccsdk.cds.version}</version> <exclusions> <exclusion> <groupId>*</groupId> @@ -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() + } } </source> </configuration> 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 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>test-blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <artifactId>capability_cli</artifactId> - <name>CBA - Test Capability CLI</name> - <description>CBA - Test Capability CLI</description> + <name>Components Model Catalog - Blueprints Model - Test Blueprints - Capability CLI</name> <dependencies> <dependency> @@ -43,9 +42,9 @@ <artifactId>maven-assembly-plugin</artifactId> <dependencies> <dependency> - <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>cba-assembly-descriptor</artifactId> - <version>1.0.0-SNAPSHOT</version> + <version>${ccsdk.cds.version}</version> <exclusions> <exclusion> <groupId>*</groupId> 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 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> @@ -28,8 +28,7 @@ <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>CBA - Test Blueprints</name> - <description>CBA - Test Blueprints</description> + <name>Components Model Catalog - Blueprints Model - Test Blueprints</name> <modules> <module>capability_cli</module> 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 @@ <modelVersion>4.0.0</modelVersion> <parent> - <groupId>org.onap.ccsdk.cds.cba</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>test-blueprint-model</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> - <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>resource-audit</artifactId> - <name>CBA - Test Resource Audit</name> - <description>CBA - Test Resource Audit</description> + <name>Components Model Catalog - Blueprints Model - Test Blueprints - Resource Audit</name> <dependencies> <dependency> @@ -45,9 +43,9 @@ <version>3.1.0</version> <dependencies> <dependency> - <groupId>org.onap.ccsdk.cds.blueprintsprocessor</groupId> + <groupId>org.onap.ccsdk.cds.components.cba</groupId> <artifactId>cba-assembly-descriptor</artifactId> - <version>1.0.0-SNAPSHOT</version> + <version>${ccsdk.cds.version}</version> <exclusions> <exclusion> <groupId>*</groupId> 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 @@ <parent> <groupId>org.onap.ccsdk.cds</groupId> - <artifactId>parent</artifactId> + <artifactId>cds-aggregator</artifactId> <version>1.0.0-SNAPSHOT</version> <relativePath>..</relativePath> </parent> - <artifactId>components</artifactId> + <artifactId>cds-components</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> - <name>Components Root</name> - <description>Components</description> + <name>Components (Root)</name> <modules> + <module>cba-parent</module> <module>model-catalog/blueprint-model</module> </modules> </project> |