Fixing issues in virtual fire alarm

revert-dabc3590
megala21 8 years ago
parent 9fcee2917f
commit 20f8708edb

@ -29,6 +29,7 @@ import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.advanced.transport.
import java.io.*;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.security.PrivateKey;
import java.security.PublicKey;
@ -67,15 +68,14 @@ public class AgentUtilOperations {
try {
ClassLoader loader = AgentUtilOperations.class.getClassLoader();
URL path = loader.getResource(propertiesFileName);
System.out.println(path);
String root = path.getPath().replace(
"wso2-firealarm-virtual-agent-advanced.jar!/deviceConfig.properties",
"").replace("jar:", "").replace("file:", "");
agentManager.setRootPath(root);
propertiesInputStream = new FileInputStream(
root + AgentConstants.AGENT_PROPERTIES_FILE_NAME);
log.info(AgentConstants.LOG_APPENDER + path);
String rootPath = path.getPath().replace("wso2-firealarm-virtual-agent-advanced.jar!/deviceConfig"
+ ".properties", "").replace("jar:", "").replace("file:", "");
rootPath = URLDecoder.decode(rootPath, StandardCharsets.UTF_8.toString());
agentManager.setRootPath(rootPath);
String deviceConfigFilePath = rootPath + AgentConstants.AGENT_PROPERTIES_FILE_NAME;
propertiesInputStream = new FileInputStream(deviceConfigFilePath);
//load a properties file from class path, inside static method
properties.load(propertiesInputStream);

@ -1132,7 +1132,7 @@
<carbon.devicemgt.version.range>[2.0.0, 3.0.0)</carbon.devicemgt.version.range>
<!-- Carbon App Management -->
<carbon.appmgt.version>1.2.15</carbon.appmgt.version>
<carbon.appmgt.version>1.2.25</carbon.appmgt.version>
<!-- Carbon Device Management Plugins -->
<carbon.devicemgt.plugins.version>3.0.36-SNAPSHOT</carbon.devicemgt.plugins.version>

Loading…
Cancel
Save