git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@155087 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4aebbd8d3a
commit
7fe54ebddb
|
@ -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;
|
||||
|
||||
|
||||
|
@ -264,6 +268,19 @@ public class CheckMethod {
|
|||
|
||||
|
||||
|
||||
public List<String> getFiles(String a){
|
||||
|
||||
String[] array = a.split(",");
|
||||
ArrayList<String> list = new ArrayList<>(Arrays.asList(array));
|
||||
List<String> ls = new LinkedList<String>();
|
||||
|
||||
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.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***
|
||||
if (a.doesExist("/home/gcube/wps_algorithms/algorithms/WINDOWS_BLACK_BOX_EXAMPLE_interface.jar")){
|
||||
System.out.println("CCCC");***REMOVED***
|
||||
|
||||
***REMOVED*** File aa = new File("/home/gcube/wps_algorithms/algorithms/RBLACKBOX_interface.jar");
|
||||
***REMOVED*** a.copyFromDmToSVN(aa, "Dev");
|
||||
|
||||
|
|
|
@ -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<String> validDependencies = new LinkedList<String>();
|
||||
|
||||
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***
|
||||
|
|
Loading…
Reference in New Issue