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 aed8821..9059ca3 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 @@ -7,6 +7,10 @@ import java.io.FileWriter; import java.io.InputStream; ***REMOVED*** ***REMOVED*** +import java.util.ArrayList; +import java.util.Arrays; +***REMOVED*** +***REMOVED*** import java.util.Vector; @@ -263,7 +267,20 @@ public class CheckMethod { - + + public List getFiles(String a){ + + String[] array = a.split(","); + ArrayList list = new ArrayList<>(Arrays.asList(array)); + List ls = new LinkedList(); + + for (String s: list){ + ls.add(s.trim()); + ***REMOVED*** + + return ls; +***REMOVED*** + @@ -277,6 +294,9 @@ public class CheckMethod { ***REMOVED*** System.out.println(a.getStagingHost()); CheckMethod a = new CheckMethod(); + + a.getFiles("/trunk/data-analysis/RConfiguration/RPackagesManagement/r_deb_pkgs.txt, /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt, /trunk/data-analysis/RConfiguration/RPackagesManagement/r_github_pkgs.txt"); + ***REMOVED*** File aa = new File("OCTAVEBLACKBOX.jar"); ***REMOVED*** System.out.println(aa.getName()); ***REMOVED*** System.out.println(aa.getPath()); @@ -287,16 +307,16 @@ public class CheckMethod { ***REMOVED***a.copyFromDmToSVN(aa); - if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548")){ - System.out.println("AAA");***REMOVED*** - - if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar")){ - System.out.println("BBBB"); - -***REMOVED*** - if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE_interface.jar")){ - System.out.println("CCCC");***REMOVED*** - +***REMOVED*** if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548")){ +***REMOVED*** System.out.println("AAA");***REMOVED*** +***REMOVED*** +***REMOVED*** if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar")){ +***REMOVED*** System.out.println("BBBB"); +***REMOVED*** +***REMOVED******REMOVED*** +***REMOVED*** if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE_interface.jar")){ +***REMOVED*** System.out.println("CCCC");***REMOVED*** +***REMOVED*** ***REMOVED*** File aa = new File("/home/gcube/wps_algorithms/algorithms/RBLACKBOX_interface.jar"); ***REMOVED*** a.copyFromDmToSVN(aa, "Dev"); 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 8355950..b14d19d 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 @@ -566,14 +566,20 @@ public class SVNUpdater { System.out.println("Checking dependencies list: " + file); - final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); - svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream); + CheckMethod cm = new CheckMethod(); List validDependencies = new LinkedList(); + + for (String singlefile: cm.getFiles(file)){ + + final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + svnRepository.getFile(singlefile, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream); + for(String l: byteArrayOutputStream.toString().split("\\r?\\n")){ validDependencies.add(l.trim()); - ***REMOVED*** - + ***REMOVED******REMOVED*** + + System.out.println("Valid dependencies are: "+validDependencies); for(Dependency d: deps){ String depName = d.getName(); if(!validDependencies.contains(depName)){ @@ -581,6 +587,7 @@ public class SVNUpdater { ***REMOVED*** ***REMOVED*** + return undefined; ***REMOVED*** ***REMOVED***