Skip to content
Snippets Groups Projects
Commit baff373d authored by tranoris's avatar tranoris
Browse files

Fix for #16

parent 25e4c2c8
No related branches found
No related tags found
1 merge request!12Merging 2024Q2_RC into main, creating 2024Q2 Release
Pipeline #4424 passed
...@@ -6,7 +6,6 @@ import java.lang.reflect.InvocationTargetException; ...@@ -6,7 +6,6 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.net.URL; import java.net.URL;
import java.net.URLClassLoader; import java.net.URLClassLoader;
import java.net.URLDecoder;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
...@@ -22,6 +21,7 @@ import javax.tools.ToolProvider; ...@@ -22,6 +21,7 @@ import javax.tools.ToolProvider;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.etsi.osl.tmf.lcm.model.LCMRuleSpecification; import org.etsi.osl.tmf.lcm.model.LCMRuleSpecification;
import org.springframework.boot.system.ApplicationHome;
/** /**
* @author ctranoris * @author ctranoris
...@@ -163,13 +163,12 @@ public class LCMRulesExecutor { ...@@ -163,13 +163,12 @@ public class LCMRulesExecutor {
* This is the location of the jar inside the running container * This is the location of the jar inside the running container
*/ */
String jarpath = new File(ClassLoader.getSystemClassLoader().getResource(".").getPath()).getAbsolutePath(); ApplicationHome home = new ApplicationHome(LCMRulesExecutor.class);
File classesJar = new File(jarpath); File classesJar = home.getSource();
//File classesJar = new File("/opt/openslice/lib/org.etsi.osl.osom-1.2.0-SNAPSHOT.jar");
if ( classesJar.exists() ) { if ( classesJar.exists() ) {
optionList.addAll(Arrays.asList("-classpath", classesJar.getAbsoluteFile().toString() )); optionList.addAll(Arrays.asList("-classpath", classesJar.getAbsoluteFile().toString() ));
} }
logger.debug("jarpath = "+ jarpath); logger.debug("classesJar = "+ classesJar);
logger.debug("optionList = "+ optionList.toString()); logger.debug("optionList = "+ optionList.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment