summaryrefslogtreecommitdiffstats
path: root/utils/provider
diff options
context:
space:
mode:
Diffstat (limited to 'utils/provider')
-rw-r--r--utils/provider/pom.xml35
-rwxr-xr-xutils/provider/src/main/java/org/onap/ccsdk/sli/core/utils/JREFileResolver.java7
2 files changed, 19 insertions, 23 deletions
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 @@
<?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">
+<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.sli.core</groupId>
- <artifactId>utils</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <groupId>org.onap.ccsdk.parent</groupId>
+ <artifactId>binding-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <relativePath/>
</parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>bundle</packaging>
+ <groupId>org.onap.ccsdk.sli.core</groupId>
<artifactId>utils-provider</artifactId>
- <name>SLI Core Utilities Package</name>
+ <version>0.2.1-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+ <name>ccsdk-sli-core :: utils :: ${project.artifactId}</name>
<description>
The SLI Core Utilities Package provides common functionality for setting up SLI connectivity.
</description>
+ <organization>
+ <name>ONAP</name>
+ </organization>
<dependencies>
<dependency>
@@ -26,6 +31,7 @@
<groupId>equinoxSDK381</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${equinox.osgi.version}</version>
+ <scope>provided</scope>
</dependency>
<!-- Testing Dependencies -->
@@ -41,17 +47,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <version>${bundle.plugin.version}</version>
- </plugin>
- </plugins>
- </build>
- <organization>
- <name>Inocybe Technologies and Others</name>
- </organization>
</project>
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<File> 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();