package net.exkazuu;

import java.io.IOException;

public class GitManager {
	private static GitManager gm;
	private Runtime rt;
	private GitManager() {
		rt = Runtime.getRuntime();
	}
	
	public static GitManager getInstance() {
		if(gm == null) {
			gm = new GitManager();
		}
		return gm;
	}

	public void clone(String address, String name) {
		String command = "git clone " + address;
		try {
			rt.exec(command);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public Boolean test() {
		String command = "mvn test";
		try {
			rt.exec(command);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return true;
	}
	
	public void stop() {
		try {
			Thread.sleep(300000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
}

@@ -32,27 +32,123 @@
 java.io.
-IOException
+BufferedReader;%0D%0Aimport java.io.IOException;%0D%0Aimport java.io.InputStream;%0D%0Aimport java.io.InputStreamReader
 ;%0D%0A%0D%0Apub
@@ -472,16 +472,17 @@
 mmand = 
+(
 %22git clo
@@ -495,16 +495,33 @@
  address
+ + %22 C:/%22 + name)
 ;%0D%0A%09%09try
@@ -672,16 +672,27 @@
 an test(
+String name
 ) %7B%0D%0A%09%09S
@@ -716,17 +716,28 @@
 mvn test
-%22
+ C:/%22 + name
 ;%0D%0A%09%09try
@@ -735,32 +735,43 @@
 e;%0D%0A%09%09try %7B%0D%0A%09%09%09
+Process p =
 rt.exec(command)
@@ -765,32 +765,395 @@
 exec(command);%0D%0A
+%09%09%09InputStream is = p.getInputStream();%0D%0A%09%09%09InputStreamReader isr = new InputStreamReader(is);%0D%0A%09%09%09BufferedReader br = new BufferedReader(isr);%0D%0A%09%09%09%0D%0A%09%09%09String res;%0D%0A%09%09%09Boolean flag = false;%0D%0A%09%09%09while((res = br.readLine()) != null) %7B%0D%0A%09%09%09%09if(res.contains(%22SUCCESSFULL%22)) %7B%0D%0A%09%09%09%09%09flag = true;%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%0D%0A%09%09%09%0D%0A%09%09%09if(flag) %7B%0D%0A%09%09%09%09System.out.println(name);%0D%0A%09%09%09%7D%0D%0A
 %09%09%7D catch (IOExc
@@ -1434,10 +1434,8 @@
 %09%7D%0D%0A%09%0D%0A%7D
-%0D%0A

Create new class for using git and maven.