This commit is contained in:
Nunzio Andrea Galante 2017-10-10 14:25:11 +00:00
parent 58cb07dc26
commit a89b26a74c
2 changed files with 42 additions and 15 deletions

View File

@ -7,6 +7,10 @@ import java.io.FileWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
***REMOVED***
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
***REMOVED***
import java.util.Vector;
@ -263,7 +267,20 @@ public class CheckMethod ***REMOVED***
public List<String> getFiles(String a)***REMOVED***
String[] array = a.split(",");
ArrayList<String> list = new ArrayList<>(Arrays.asList(array));
List<String> ls = new LinkedList<String>();
for (String s: list)***REMOVED***
ls.add(s.trim());
***REMOVED***
return ls;
***REMOVED***
@ -277,6 +294,9 @@ public class CheckMethod ***REMOVED***
***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***
***REMOVED***a.copyFromDmToSVN(aa);
if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "***REMOVED***"))***REMOVED***
System.out.println("AAA");***REMOVED***
if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar"))***REMOVED***
System.out.println("BBBB");
***REMOVED***
if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE_interface.jar"))***REMOVED***
System.out.println("CCCC");***REMOVED***
***REMOVED*** if (a.checkMethod("dataminer-ghost-d.dev.d4science.org", "***REMOVED***"))***REMOVED***
***REMOVED*** System.out.println("AAA");***REMOVED***
***REMOVED***
***REMOVED*** if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE.jar"))***REMOVED***
***REMOVED*** System.out.println("BBBB");
***REMOVED***
***REMOVED******REMOVED***
***REMOVED*** if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE_interface.jar"))***REMOVED***
***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");

View File

@ -566,14 +566,20 @@ public class SVNUpdater ***REMOVED***
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<String> validDependencies = new LinkedList<String>();
for (String singlefile: cm.getFiles(file))***REMOVED***
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
svnRepository.getFile(singlefile, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
for(String l: byteArrayOutputStream.toString().split("\\r?\\n"))***REMOVED***
validDependencies.add(l.trim());
***REMOVED***
***REMOVED******REMOVED***
System.out.println("Valid dependencies are: "+validDependencies);
for(Dependency d: deps)***REMOVED***
String depName = d.getName();
if(!validDependencies.contains(depName))***REMOVED***
@ -581,6 +587,7 @@ public class SVNUpdater ***REMOVED***
***REMOVED***
***REMOVED***
return undefined;
***REMOVED***
***REMOVED***