From 131cb46f6109a6099a445cb8e1b12ff5b68ae6de Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Thu, 1 Feb 2018 16:57:00 -0500 Subject: Upgrade sli/core to Nitrogen Use Apache derby for dblib SingleFeatureTest Change-Id: I6b41f7ede1a98b33824fceea9100e75c1ce8dda4 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney Generalization of CCSDK core/utils framework Changes made: * Created generalized version of core/utils/dblib as core/utils/common * Deprecated core/utils/dblib package Change-Id: I0992c43910278fbe254674d1e39d7e4fcad0a592 Issue-ID: CCSDK-168 Signed-off-by: Rich Tabedzki Use Apache derby for dblib test Use Apache derby for dblib SingleFeatureTest Change-Id: Ie497557f162e203fa5c5c82c17ddc55ba0c11b38 Issue-ID: CCSDK-175 Signed-off-by: Dan Timoney --- utils/features/features-util/pom.xml | 29 ++++ utils/features/features3-util/pom.xml | 141 ++++++++++++++++++++ .../features3-util/src/main/resources/features.xml | 16 +++ utils/features/pom.xml | 146 +++------------------ utils/features/sdnc-slicore-utils/pom.xml | 52 ++++++++ utils/features/src/main/resources/features.xml | 16 --- utils/installer/pom.xml | 25 ++-- utils/pom.xml | 87 +++--------- utils/provider/pom.xml | 35 ++--- .../onap/ccsdk/sli/core/utils/JREFileResolver.java | 7 +- 10 files changed, 305 insertions(+), 249 deletions(-) create mode 100644 utils/features/features-util/pom.xml create mode 100755 utils/features/features3-util/pom.xml create mode 100755 utils/features/features3-util/src/main/resources/features.xml create mode 100644 utils/features/sdnc-slicore-utils/pom.xml delete mode 100755 utils/features/src/main/resources/features.xml (limited to 'utils') diff --git a/utils/features/features-util/pom.xml b/utils/features/features-util/pom.xml new file mode 100644 index 000000000..9a4cd43c5 --- /dev/null +++ b/utils/features/features-util/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + feature-repo-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.core + features-util + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-core :: utils :: ${project.artifactId} + + + + ${project.groupId} + ccsdk-slicore-utils + ${project.version} + xml + features + + + + diff --git a/utils/features/features3-util/pom.xml b/utils/features/features3-util/pom.xml new file mode 100755 index 000000000..5cc0d8995 --- /dev/null +++ b/utils/features/features3-util/pom.xml @@ -0,0 +1,141 @@ + + + 4.0.0 + + utils + org.onap.ccsdk.sli.core + 0.2.0-SNAPSHOT + + + org.onap.ccsdk.sli.core + utils-features + ccsdk-sli-core :: utils :: ${project.artifactId} + DBLIB Adaptor - Features + + jar + + + + + + org.onap.ccsdk.sli.core + utils-provider + ${project.version} + + + + commons-lang + commons-lang + ${commons.lang.version} + compile + + + + org.opendaylight.mdsal + features-mdsal + ${odl.mdsal.features.version} + features + xml + + runtime + + + + org.apache.tomcat + tomcat-jdbc + ${tomcat-jdbc.version} + + + + + org.opendaylight.odlparent + opendaylight-karaf-empty + ${odl.karaf.empty.distro.version} + zip + + + + + org.opendaylight.odlparent + features-test + ${odl.commons.opendaylight.version} + test + + + + org.opendaylight.yangtools + features-yangtools + ${odl.yangtools.version} + features + xml + runtime + + + + + + + true + src/main/resources + + + + + org.apache.maven.plugins + maven-resources-plugin + + + filter + + resources + + generate-resources + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-artifacts + + attach-artifact + + package + + + + ${project.build.directory}/classes/${features.file} + xml + features + + + + + + + + + diff --git a/utils/features/features3-util/src/main/resources/features.xml b/utils/features/features3-util/src/main/resources/features.xml new file mode 100755 index 000000000..547832ba6 --- /dev/null +++ b/utils/features/features3-util/src/main/resources/features.xml @@ -0,0 +1,16 @@ + + + + + mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features + + + + + odl-mdsal-broker + mvn:org.onap.ccsdk.sli.core/utils-provider/${project.version} + + + diff --git a/utils/features/pom.xml b/utils/features/pom.xml index be6227d7e..8bc1cd8a8 100755 --- a/utils/features/pom.xml +++ b/utils/features/pom.xml @@ -1,138 +1,22 @@ - 4.0.0 - - utils - org.onap.ccsdk.sli.core - 0.2.0-SNAPSHOT - - utils-features - DBLIB Adaptor - Features + 4.0.0 - jar + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + - + org.onap.ccsdk.sli.core + utils-features-aggregator + pom + ccsdk-sli-core :: utils :: ${project.artifactId} - - org.onap.ccsdk.sli.core - utils-provider - ${project.version} - - - - commons-lang - commons-lang - ${commons.lang.version} - compile - - - - org.opendaylight.mdsal - features-mdsal - ${odl.mdsal.features.version} - features - xml - - runtime - - - - org.apache.tomcat - tomcat-jdbc - ${tomcat-jdbc.version} - - - - - org.opendaylight.odlparent - opendaylight-karaf-empty - ${odl.karaf.empty.distro.version} - zip - - - - - org.opendaylight.odlparent - features-test - ${odl.commons.opendaylight.version} - test - - - - org.opendaylight.yangtools - features-yangtools - ${odl.yangtools.version} - features - xml - runtime - - - - - - - true - src/main/resources - - - - - org.apache.maven.plugins - maven-resources-plugin - - - filter - - resources - - generate-resources - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - attach-artifact - - package - - - - ${project.build.directory}/classes/${features.file} - xml - features - - - - - - - - + + features-util + sdnc-slicore-utils + diff --git a/utils/features/sdnc-slicore-utils/pom.xml b/utils/features/sdnc-slicore-utils/pom.xml new file mode 100644 index 000000000..85c81ff67 --- /dev/null +++ b/utils/features/sdnc-slicore-utils/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + + + org.onap.ccsdk.parent + single-feature-parent + 1.0.1-SNAPSHOT + + + + org.onap.ccsdk.sli.core + ccsdk-slicore-utils + 0.2.1-SNAPSHOT + feature + + ccsdk-sli-core :: utils :: ${project.artifactId} + + + + + org.opendaylight.mdsal.model + mdsal-model-artifacts + 0.11.1 + pom + import + + + org.opendaylight.controller + mdsal-artifacts + 1.6.1 + pom + import + + + + + + org.opendaylight.controller + odl-mdsal-broker + xml + features + + + + ${project.groupId} + utils-provider + ${project.version} + + + + diff --git a/utils/features/src/main/resources/features.xml b/utils/features/src/main/resources/features.xml deleted file mode 100755 index 547832ba6..000000000 --- a/utils/features/src/main/resources/features.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features - - - - - odl-mdsal-broker - mvn:org.onap.ccsdk.sli.core/utils-provider/${project.version} - - - diff --git a/utils/installer/pom.xml b/utils/installer/pom.xml index df7fc0de8..c19ac8c67 100755 --- a/utils/installer/pom.xml +++ b/utils/installer/pom.xml @@ -1,19 +1,25 @@ 4.0.0 + - utils - org.onap.ccsdk.sli.core - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + + org.onap.ccsdk.sli.core utils-installer - SLI core utils - Karaf Installer + 0.2.1-SNAPSHOT pom + ccsdk-sli-core :: utils :: ${project.artifactId} + - sdnc-slicore-utils - sdnc-slicore-utils - mvn:org.onap.ccsdk.sli.core/utils-features/${project.version}/xml/features + ccsdk-slicore-utils + ${application.name} + mvn:org.onap.ccsdk.sli.core/${features.boot}/${project.version}/xml/features false @@ -21,10 +27,10 @@ org.onap.ccsdk.sli.core - utils-features + ${application.name} ${project.version} - features xml + features * @@ -134,5 +140,4 @@ - diff --git a/utils/pom.xml b/utils/pom.xml index 17a0f6b6e..cd342f774 100755 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -1,77 +1,26 @@ - - - org.onap.ccsdk.sli.core - ccsdk-sli-core - 0.2.0-SNAPSHOT + + 4.0.0 + + + org.onap.ccsdk.parent + odlparent-lite + 1.0.1-SNAPSHOT + + org.onap.ccsdk.sli.core + utils + 0.2.1-SNAPSHOT + pom - 4.0.0 - pom - org.onap.ccsdk.sli.core - utils - - - SLI Utils - Utilities used across sli-core - - 0.2.0-SNAPSHOT - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compile.plugin.version} - - ${java.version.source} - ${java.version.target} - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.10 - - - - aggregate - - aggregate - - site - - - - - - maven-source-plugin - 2.1.1 - - - bundle-sources - package - - - jar-no-fork - - - test-jar-no-fork - - - - - - - - - - AT&T + ccsdk-sli-core :: utils + Utilities used across sli-core + + ONAP - + + provider features installer diff --git a/utils/provider/pom.xml b/utils/provider/pom.xml index b0adc7d46..7a4e8c9ed 100644 --- a/utils/provider/pom.xml +++ b/utils/provider/pom.xml @@ -1,21 +1,26 @@ - + + 4.0.0 - org.onap.ccsdk.sli.core - utils - 0.2.0-SNAPSHOT + org.onap.ccsdk.parent + binding-parent + 1.0.1-SNAPSHOT + - 4.0.0 - bundle + org.onap.ccsdk.sli.core utils-provider - SLI Core Utilities Package + 0.2.1-SNAPSHOT + bundle + ccsdk-sli-core :: utils :: ${project.artifactId} The SLI Core Utilities Package provides common functionality for setting up SLI connectivity. + + ONAP + @@ -26,6 +31,7 @@ equinoxSDK381 org.eclipse.osgi ${equinox.osgi.version} + provided @@ -41,17 +47,4 @@ test - - - - - org.apache.felix - maven-bundle-plugin - ${bundle.plugin.version} - - - - - Inocybe Technologies and Others - diff --git a/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java b/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java index 8da9b7ef0..cc164d042 100755 --- a/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java +++ b/utils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java @@ -7,9 +7,9 @@ * 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. @@ -54,9 +54,11 @@ public class JREFileResolver implements PropertiesFileResolver { */ @Override public Optional resolveFile(final String filename) { + final Bundle bundle = FrameworkUtil.getBundle(this.clazz); final File dataFile; + try { if (bundle == null) { return Optional.empty(); @@ -67,6 +69,7 @@ public class JREFileResolver implements PropertiesFileResolver { return Optional.empty(); } + dataFile = bundle.getDataFile(filename); if(dataFile.exists()) { dataFile.delete(); -- cgit 1.2.3-korg