aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib
diff options
context:
space:
mode:
authorGautam Shah <gautams@amdocs.com>2018-04-21 16:18:37 +0530
committerGAUTAMS <gautams@amdocs.com>2018-04-26 17:47:29 +0530
commit3de22e1c6c2711072ce996335e7250445a39d320 (patch)
treec7a528bee3166b3262eef9977b0f87923df0e99f /openecomp-be/lib
parentd71a8de8c7b688eabb250e524dc4f6000b3233b6 (diff)
Reducing onboarding backend maven build time
Reducing onboarding backend maven build time Change-Id: Id0178cbf010e46f741f4bff11e14b0801f14d4b8 Issue-ID: SDC-1189 Signed-off-by: GAUTAMS <gautams@amdocs.com>
Diffstat (limited to 'openecomp-be/lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml3
-rw-r--r--openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-api/pom.xml25
-rw-r--r--openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-core/pom.xml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-impl/pom.xml30
-rw-r--r--openecomp-be/lib/openecomp-sdc-orchestration-lib/pom.xml23
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml10
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java19
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java224
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml52
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-sdk/pom.xml45
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml2
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java54
-rw-r--r--openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json3
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/pom.xml3
-rw-r--r--openecomp-be/lib/pom.xml1
15 files changed, 121 insertions, 403 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml
index 0e6015236b..3a4ae67125 100644
--- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/pom.xml
@@ -109,4 +109,7 @@
</dependencies>
+ <properties>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ </properties>
</project>
diff --git a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-api/pom.xml b/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-api/pom.xml
deleted file mode 100644
index f3ee4de5ff..0000000000
--- a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-api/pom.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-datatypes-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchestration-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchesrtation-api</artifactId>
- <version>1.2.0-SNAPSHOT</version>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-core/pom.xml b/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-core/pom.xml
deleted file mode 100644
index 695b929543..0000000000
--- a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-core/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchesrtation-api</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.core</groupId>
- <artifactId>openecomp-utilities-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchestration-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchesrtation-core</artifactId>
- <version>1.2.0-SNAPSHOT</version>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-impl/pom.xml
deleted file mode 100644
index d663ad1d67..0000000000
--- a/openecomp-be/lib/openecomp-sdc-orchestration-lib/openecomp-sdc-orchesrtation-impl/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
- <dependencies>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchesrtation-api</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-logging-api</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchestration-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-orchesrtation-impl</artifactId>
- <version>1.2.0-SNAPSHOT</version>
-
-
-</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-orchestration-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-orchestration-lib/pom.xml
deleted file mode 100644
index 08fcf78942..0000000000
--- a/openecomp-be/lib/openecomp-sdc-orchestration-lib/pom.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>
-
- <artifactId>openecomp-sdc-orchestration-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <parent>
- <artifactId>openecomp-sdc-lib</artifactId>
- <groupId>org.openecomp.sdc</groupId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <modules>
- <module>openecomp-sdc-orchesrtation-api</module>
- <module>openecomp-sdc-orchesrtation-core</module>
- <module>openecomp-sdc-orchesrtation-impl</module>
- </modules>
-</project> \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml
index b08067b6b4..0535d9dba1 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/pom.xml
@@ -93,7 +93,7 @@
<configuration>
<parallel>classes</parallel>
<threadCount>1</threadCount>
- <forkCount>0</forkCount>
+ <forkCount>${fork.count}</forkCount>
<printSummary>false</printSummary>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<rerunFailingTestsCount>1</rerunFailingTestsCount>
@@ -103,12 +103,14 @@
<systemPropertyVariables>
<logback.configurationFile>src/test/resources/logback-test.xml</logback.configurationFile>
</systemPropertyVariables>
- <dependenciesToScan>
- org.openecomp.sdc:build-helper
- </dependenciesToScan>
+ <useSystemClassLoader>${useSystemClassLoader}</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
+ <properties>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ </properties>
+
</project>
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java
deleted file mode 100644
index 3867dadaeb..0000000000
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/helper/impl/NameExtractorServiceImpl.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
index 2387390df9..801f2c67a0 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseFullTranslationTest.java
@@ -18,11 +18,22 @@ package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslati
import static org.junit.Assert.assertEquals;
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
import org.apache.commons.collections4.MapUtils;
import org.junit.Assert;
import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
import org.openecomp.core.translator.api.HeatToToscaTranslator;
import org.openecomp.core.translator.datatypes.TranslatorOutput;
import org.openecomp.core.translator.factory.HeatToToscaTranslatorFactory;
@@ -39,133 +50,116 @@ import org.openecomp.sdc.translator.TestUtils;
import org.togglz.testing.TestFeatureManager;
import org.togglz.testing.TestFeatureManagerProvider;
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
public class BaseFullTranslationTest {
- public static final String IN_POSTFIX = "/in";
- public static final String OUT_POSTFIX = "/out";
-
- @Rule
- public TestName name = new TestName();
-
- protected static TestFeatureManager manager;
- private static File tempDir = new File(System.getProperty("java.io.tmpdir"));
-
- @BeforeClass
- public static void enableToggleableFeatures(){
- manager = new TestFeatureManager(ToggleableFeature.class);
- manager.enableAll();
- TestFeatureManagerProvider.setFeatureManager(manager);
- }
-
-
- public static void disableToggleableFeatures() {
- manager.disableAll();
- manager = null;
- TestFeatureManagerProvider.setFeatureManager(null);
- }
-
- protected void testTranslationWithInit(String path) throws IOException {
- byte[] translatedZipFile = initTranslatorAndTranslate(path);
- testTranslation(path, translatedZipFile);
- }
-
- protected byte[] initTranslatorAndTranslate(String path) throws IOException {
- HeatToToscaTranslator heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
- return translateZipFile(path, heatToToscaTranslator);
- }
-
- protected void testTranslation(String basePath, byte[] translatedZipFile) throws IOException {
-
- URL url = BaseFullTranslationTest.class.getResource(basePath + OUT_POSTFIX);
- Set<String> expectedResultFileNameSet = new HashSet<>();
- Map<String, byte[]> expectedResultMap = new HashMap<>();
-
- String path = url.getPath();
- File pathFile = new File(path);
- File[] files = pathFile.listFiles();
- Assert.assertNotNull("manifest files is empty", files);
- for (File expectedFile : files) {
- expectedResultFileNameSet.add(expectedFile.getName());
- try (FileInputStream input = new FileInputStream(expectedFile)) {
- expectedResultMap.put(expectedFile.getName(), FileUtils.toByteArray(input));
- }
+ public static final String IN_POSTFIX = "/in";
+ public static final String OUT_POSTFIX = "/out";
+
+
+ protected static TestFeatureManager manager;
+
+ @BeforeClass
+ public static void enableToggleableFeatures() {
+ manager = new TestFeatureManager(ToggleableFeature.class);
+ manager.enableAll();
+ TestFeatureManagerProvider.setFeatureManager(manager);
}
- try (ByteArrayInputStream fis = new ByteArrayInputStream(translatedZipFile);BufferedInputStream bis = new BufferedInputStream(fis);
- ZipInputStream zis = new ZipInputStream(bis)) {
- ZipEntry entry;
- String name;
- String expected;
- String actual;
- while ((entry = zis.getNextEntry()) != null) {
+ public static void disableToggleableFeatures() {
+ manager.disableAll();
+ manager = null;
+ TestFeatureManagerProvider.setFeatureManager(null);
+ }
- name = entry.getName()
- .substring(entry.getName().lastIndexOf(File.separator) + 1, entry.getName().length());
- if (expectedResultFileNameSet.contains(name)) {
- expected = new String(expectedResultMap.get(name)).trim().replace("\r", "");
- actual = new String(FileUtils.toByteArray(zis)).trim().replace("\r", "");
- assertEquals("difference in file: " + name, expected, actual);
+ protected void testTranslationWithInit(String path) throws IOException {
+ byte[] translatedZipFile = initTranslatorAndTranslate(path);
+ testTranslation(path, translatedZipFile);
+ }
- expectedResultFileNameSet.remove(name);
- }
- }
- if (expectedResultFileNameSet.isEmpty()) {
- expectedResultFileNameSet.forEach(System.out::println);
- }
+ protected byte[] initTranslatorAndTranslate(String path) throws IOException {
+ HeatToToscaTranslator heatToToscaTranslator = HeatToToscaTranslatorFactory.getInstance().createInterface();
+ return translateZipFile(path, heatToToscaTranslator);
}
- assertEquals(0, expectedResultFileNameSet.size());
- }
-
- private byte[] translateZipFile(String basePath, HeatToToscaTranslator heatToToscaTranslator) throws IOException {
- URL inputFilesUrl = this.getClass().getResource(basePath + IN_POSTFIX);
- String path = inputFilesUrl.getPath();
- TestUtils.addFilesToTranslator(heatToToscaTranslator, path);
- TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
- Assert.assertNotNull(translatorOutput);
- if (MapUtils.isNotEmpty(translatorOutput.getErrorMessages()) && MapUtils.isNotEmpty(
- MessageContainerUtil
- .getMessageByLevel(ErrorLevel.ERROR, translatorOutput.getErrorMessages()))) {
- throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withMessage(
- "Error in validation " + getErrorAsString(translatorOutput.getErrorMessages()))
- .withId("Validation Error").withCategory(ErrorCategory.APPLICATION).build());
+
+ protected void testTranslation(String basePath, byte[] translatedZipFile) throws IOException {
+
+ URL url = BaseFullTranslationTest.class.getResource(basePath + OUT_POSTFIX);
+ Set<String> expectedResultFileNameSet = new HashSet<>();
+ Map<String, byte[]> expectedResultMap = new HashMap<>();
+
+ String path = url.getPath();
+ File pathFile = new File(path);
+ File[] files = pathFile.listFiles();
+ Assert.assertNotNull("manifest files is empty", files);
+ for (File expectedFile : files) {
+ expectedResultFileNameSet.add(expectedFile.getName());
+ try (FileInputStream input = new FileInputStream(expectedFile)) {
+ expectedResultMap.put(expectedFile.getName(), FileUtils.toByteArray(input));
+ }
+ }
+
+ try (ByteArrayInputStream fis = new ByteArrayInputStream(translatedZipFile);
+ BufferedInputStream bis = new BufferedInputStream(fis); ZipInputStream zis = new ZipInputStream(bis)) {
+ ZipEntry entry;
+ String name;
+ String expected;
+ String actual;
+
+ while ((entry = zis.getNextEntry()) != null) {
+
+ name = entry.getName()
+ .substring(entry.getName().lastIndexOf(File.separator) + 1, entry.getName().length());
+ if (expectedResultFileNameSet.contains(name)) {
+ expected = new String(expectedResultMap.get(name)).trim().replace("\r", "");
+ actual = new String(FileUtils.toByteArray(zis)).trim().replace("\r", "");
+ assertEquals("difference in file: " + name, expected, actual);
+
+ expectedResultFileNameSet.remove(name);
+ }
+ }
+ if (expectedResultFileNameSet.isEmpty()) {
+ expectedResultFileNameSet.forEach(System.out::println);
+ }
+ }
+ assertEquals(0, expectedResultFileNameSet.size());
}
- byte[] data = new ToscaFileOutputServiceCsarImpl().createOutputFile(translatorOutput.getToscaServiceModel(), null);
+ private byte[] translateZipFile(String basePath, HeatToToscaTranslator heatToToscaTranslator) throws IOException {
+ URL inputFilesUrl = this.getClass().getResource(basePath + IN_POSTFIX);
+ String path = inputFilesUrl.getPath();
+ TestUtils.addFilesToTranslator(heatToToscaTranslator, path);
+ TranslatorOutput translatorOutput = heatToToscaTranslator.translate();
+ Assert.assertNotNull(translatorOutput);
+ if (MapUtils.isNotEmpty(translatorOutput.getErrorMessages()) && MapUtils.isNotEmpty(
+ MessageContainerUtil.getMessageByLevel(ErrorLevel.ERROR, translatorOutput.getErrorMessages()))) {
+ throw new CoreException((new ErrorCode.ErrorCodeBuilder()).withMessage(
+ "Error in validation " + getErrorAsString(translatorOutput.getErrorMessages()))
+ .withId("Validation Error")
+ .withCategory(ErrorCategory.APPLICATION).build());
+ }
- return data;
- }
+ byte[] data =
+ new ToscaFileOutputServiceCsarImpl().createOutputFile(translatorOutput.getToscaServiceModel(), null);
- private String getErrorAsString(Map<String, List<ErrorMessage>> errorMessages) {
- StringBuilder sb = new StringBuilder();
- errorMessages.entrySet().forEach(
- entry -> sb.append("File:").append(entry.getKey()).append(System.lineSeparator())
- .append(getErrorList(entry.getValue())));
+ return data;
+ }
- return sb.toString();
- }
+ private String getErrorAsString(Map<String, List<ErrorMessage>> errorMessages) {
+ StringBuilder sb = new StringBuilder();
+ errorMessages.entrySet().forEach(
+ entry -> sb.append("File:").append(entry.getKey()).append(System.lineSeparator())
+ .append(getErrorList(entry.getValue())));
- private String getErrorList(List<ErrorMessage> errors) {
- StringBuilder sb = new StringBuilder();
- errors.forEach(
- error -> sb.append(error.getMessage()).append("[").append(error.getLevel()).append("]")
- .append(System.lineSeparator()));
- return sb.toString();
- }
+ return sb.toString();
+ }
+
+ private String getErrorList(List<ErrorMessage> errors) {
+ StringBuilder sb = new StringBuilder();
+ errors.forEach(error -> sb.append(error.getMessage()).append("[").append(error.getLevel()).append("]")
+ .append(System.lineSeparator()));
+ return sb.toString();
+ }
}
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml
deleted file mode 100644
index 8b59f02f95..0000000000
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-impl/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- 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>
-
- <name>openecomp-sdc-translator-impl</name>
- <artifactId>openecomp-sdc-translator-impl</artifactId>
-
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-translator-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.core</groupId>
- <artifactId>openecomp-heat-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.core</groupId>
- <artifactId>openecomp-tosca-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- need to be changed to sdk -->
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-translator-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-sdk/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-sdk/pom.xml
deleted file mode 100644
index 6e48011eb2..0000000000
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-sdk/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns="http://maven.apache.org/POM/4.0.0"
- 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>
-
- <name>openecomp-sdc-translator-sdk</name>
- <artifactId>openecomp-sdc-translator-sdk</artifactId>
-
-
- <parent>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>../..</relativePath>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>${junit.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc</groupId>
- <artifactId>openecomp-sdc-translator-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.core</groupId>
- <artifactId>openecomp-heat-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.openecomp.sdc.core</groupId>
- <artifactId>openecomp-tosca-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml b/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml
index bf7f5aa957..814b152daf 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/pom.xml
@@ -16,9 +16,7 @@
<modules>
<module>openecomp-sdc-translator-api</module>
- <module>openecomp-sdc-translator-sdk</module>
<module>openecomp-sdc-translator-core</module>
- <module>openecomp-sdc-translator-impl</module>
</modules>
<dependencies>
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java
deleted file mode 100644
index 4917533dd8..0000000000
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/main/java/org/openecomp/core/impl/ToscaConverterManagerImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.openecomp.core.impl;
-
-import org.openecomp.core.converter.ToscaConverter;
-import org.openecomp.core.converter.api.ToscaConverterManager;
-import org.openecomp.core.utilities.file.FileContentHandler;
-import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-public class ToscaConverterManagerImpl implements ToscaConverterManager {
-
- private static final Logger LOGGER = LoggerFactory.getLogger(ToscaConverterManagerImpl.class.getName());
- private static List<ToscaConverter> toscaConverters;
- private static final String toscaConverterFileName = "ToscaConverters.json";
- private static final String TOSCA_CONVERTER_IMPL_FORMAT_ERROR = "Failed to construct TOSCA converter for '%s' implementation.";
-
- static {
- toscaConverters = getConvertersList();
- }
-
- @Override
- public ToscaServiceModel convert(String csarName, FileContentHandler fileContentHandler) {
- return null;
- }
-
- private static List<ToscaConverter> getConvertersList(){
- List<ToscaConverter> toscaConvertersList = new ArrayList<>();
- Map<String, String> convertersMap = FileUtils.readViaInputStream(toscaConverterFileName,
- stream -> JsonUtil.json2Object(stream, Map.class));
- return getToscaConvertersList(toscaConvertersList, convertersMap);
- }
-
- private static List<ToscaConverter> getToscaConvertersList(
- List<ToscaConverter> toscaConvertersList, Map<String, String> convertersMap) {
- for(String implClassName : convertersMap.values()){
- try{
- Class<?> clazz = Class.forName(implClassName);
- Constructor<?> constructor = clazz.getConstructor();
- toscaConvertersList.add((ToscaConverter) constructor.newInstance());
- }catch (Exception ex){
- LOGGER.debug(String.format(TOSCA_CONVERTER_IMPL_FORMAT_ERROR, implClassName), ex);
- continue;
- }
- }
- return toscaConvertersList;
- }
-}
diff --git a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json b/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json
deleted file mode 100644
index e1cddeb854..0000000000
--- a/openecomp-be/lib/openecomp-tosca-converter-lib/openecomp-tosca-converter-core/src/resources/ToscaConverters.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "ToscaConverter" : "org.openecomp.core.converter.impl.ToscaConverterImpl"
-} \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/pom.xml b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
index c6f8aa17a0..eedc6cb521 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
@@ -86,6 +86,9 @@
<version>${sdc-tosca-parser.version}</version>
</dependency>
</dependencies>
+ <properties>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ </properties>
</project>
diff --git a/openecomp-be/lib/pom.xml b/openecomp-be/lib/pom.xml
index d031dd4d04..f59c05628d 100644
--- a/openecomp-be/lib/pom.xml
+++ b/openecomp-be/lib/pom.xml
@@ -32,7 +32,6 @@
<module>openecomp-healing-lib</module>
<module>openecomp-sdc-activity-log-lib</module>
<module>openecomp-tosca-converter-lib</module>
- <module>openecomp-sdc-orchestration-lib</module>
<module>openecomp-sdc-notification-lib</module>
<module>openecomp-item-permissions-lib</module>
<module>openecomp-conflict-lib</module>