记录瞬间
import org.apache.maven.plugin.MojoExecutionException;
import org.jacoco.core.tools.ExecFileLoader;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
public class MergeDump {
private final String path ;
private final File destFile ;
public MergeDump(String path){
this.path = path;
this.destFile = new File(path + "/jacoco.exec");
}
private List fileSets(String dir){
System.out.println(dir);
List fileSetList = new ArrayList();
File path = new File(dir);
if ( ! path.exists() ){
System.out.println("No path name is :" + dir);
return null;
}
File[] files = path.listFiles();
try {
if (files == null || files.length == 0) {
return null;
}
} catch (NullPointerException npe) {
npe.printStackTrace();
}
for (File file : files) {
if (file.getName().contains(".exec")) {
System.out.println("文件:" + file.ge