diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java index 1404d59..aed8821 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/CheckMethod.java @@ -85,9 +85,10 @@ public class CheckMethod { public boolean algoExists(Algorithm a/*, String env*/) throws Exception{ - - File file = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+".jar"); - File file2 = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+"_interface.jar"); + ServiceConfiguration p = new ServiceConfiguration(); + + File file = new File(p.getGhostAlgoDirectory()+"/"+a.getName()+".jar"); + File file2 = new File(p.getGhostAlgoDirectory()+"/"+a.getName()+"_interface.jar"); System.out.println("First file is located to: "+file.getPath()); @@ -115,8 +116,8 @@ public class CheckMethod { ServiceConfiguration p = new ServiceConfiguration(); System.out.println("checking existing in env: " + p.getStagingHost()); - File file = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+".jar"); - File file2 = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+"_interface.jar"); + File file = new File(p.getGhostAlgoDirectory()+"/"+a.getName()+".jar"); + File file2 = new File(p.getGhostAlgoDirectory()+"/"+a.getName()+"_interface.jar"); System.out.println("First file is located to: "+file.getPath()); @@ -244,12 +245,12 @@ public class CheckMethod { ChannelSftp sftp = (ChannelSftp) channel; - sftp.cd("/home/gcube/wps_algorithms/algorithms/"); + sftp.cd(p.getGhostAlgoDirectory()); - System.out.println("REMOTE : /home/gcube/wps_algorithms/algorithms/"+a.getName()); + System.out.println("REMOTE : "+p.getGhostAlgoDirectory()+"/"+a.getName()); System.out.println("LOCAL : /tmp/"+a.getName()); - sftp.get("/home/gcube/wps_algorithms/algorithms/"+a.getName(),"/tmp/"+a.getName()); + sftp.get(p.getGhostAlgoDirectory()+"/"+a.getName(),"/tmp/"+a.getName()); channel.disconnect(); session.disconnect(); diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java index 603f527..8355950 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/SVNUpdater.java @@ -560,9 +560,9 @@ public class SVNUpdater { ***REMOVED***to fix in next release: if the file is not present for that language in the service.properties then skip and return null list of string ***REMOVED***just to uncomment the following lines - ***REMOVED***if(file.isEmpty()){ - ***REMOVED***return undefined; - ***REMOVED******REMOVED*** + if(file.isEmpty()){ + return undefined; + ***REMOVED*** System.out.println("Checking dependencies list: " + file); diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ServiceConfiguration.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ServiceConfiguration.java index 5f09ebf..6f3bbbf 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ServiceConfiguration.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/util/ServiceConfiguration.java @@ -55,6 +55,11 @@ public class ServiceConfiguration { ***REMOVED*** + public String getGhostAlgoDirectory(){ + return props.getProperty("svn.algo.ghost.repo"); +***REMOVED*** + + ***REMOVED***RProto ***REMOVED*** public String getSVNRProtoAlgorithmsList(){