summaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml
diff options
context:
space:
mode:
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint-kotlin-parent/pom.xml161
1 files changed, 49 insertions, 112 deletions
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 1513d25d2..40cf15798 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,21 +19,19 @@
<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>
+ <version>1.1.0-SNAPSHOT</version>
</parent>
<artifactId>test-blueprint-kotlin-parent</artifactId>
- <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>
@@ -46,6 +44,10 @@
</dependency>
<dependency>
<groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
+ <artifactId>restconf-executor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.cds.blueprintsprocessor.functions</groupId>
<artifactId>cli-executor</artifactId>
</dependency>
<dependency>
@@ -62,7 +64,6 @@
<artifactId>kotlinx-coroutines-test</artifactId>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -92,43 +93,6 @@
</resources>
<plugins>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>validate-kotlin</id>
- <phase>validate</phase>
- <configuration>
- <target name="ktlint">
- <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
- <arg value="Scripts/kotlin/**/*.kt"/>
- </java>
- </target>
- <skip>${format.skipValidate}</skip>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <!-- Built-in formatter So that you wouldn't have to fix all style violations by hand.-->
- <id>format-kotlin</id>
- <phase>process-sources</phase>
- <configuration>
- <target name="ktlint">
- <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
- <arg value="-F"/>
- <arg value="Scripts/kotlin/**/*.kt"/>
- </java>
- </target>
- <skip>${format.skipExecute}</skip>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
@@ -163,23 +127,8 @@
</executions>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <executions>
- <execution>
- <id>default</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>integration-tests</id>
- <phase>none</phase>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
- <version>${kotlin.maven.version}</version>
<executions>
<execution>
<id>compile</id>
@@ -208,18 +157,6 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <executions>
- <execution>
- <id>default-test</id>
- <phase>test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<executions>
@@ -246,9 +183,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>
@@ -327,61 +264,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>