package br.ufmg.dcc.labsoft.apidiff;
import java.io.IOException;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import br.ufmg.dcc.labsoft.apidiff.detect.diff.APIDiff;

public class Main {
	
	public static void main(String[] args) {
		
		Logger logger = LoggerFactory.getLogger(Main.class);
		
		if(args.length < 1){
			System.err.println("[ERROR] Missing input parameters.");
			System.err.println("\nusage: java -jar APIDiff.jar <CSV file>");
			System.exit(0);
		}
		
		String nameFile = args[0];
//		String nameFile = "/home/aline/utilitarios/workspaces/wsc_apiBreakingChange/APIDiff/src/main/resources/files/projects-tests.csv";
		try {
			Map<String, String> projects = UtilFile.readCSV(nameFile);
			for(String nameLibray: projects.keySet()){
				String url = projects.get(nameLibray);
				APIDiff diff = new APIDiff(nameLibray, url);
				diff.calculateDiff();
			}
		} catch (IOException e) {
			logger.error("Erro ao ler arquivo com a lista de projetos.", e);
		}
		logger.info("\n\nFinished process!");

	}

}

@@ -756,16 +756,35 @@
 File);%0D%0A
+%09%09%09int index = 1;%0D%0A
 %09%09%09for(S
@@ -822,16 +822,16 @@
 et())%7B%0D%0A
-
 %09%09%09%09Stri
@@ -912,24 +912,118 @@
 ray, url);%0D%0A
+%09%09%09%09logger.info(%22%5Cn%5Cn%5B%22+nameLibray+%22%5D%5B%22 + index + %22/%22 + projects.size()+ %22%5D%22);%0D%0A%09%09%09%09index++;%0D%0A
 %09%09%09%09diff.cal
@@ -1145,56 +1145,13 @@
 );%0D%0A
+
 %09%09%7D%0D%0A
-%09%09logger.info(%22%5Cn%5CnFinished process!%22);%0D%0A%0D%0A
 %09%7D%0D%0A

Ajuste das mensagens de log para informar a quantidade de bibliotecas processadas e pendentes.