Create dep. graph directory if it doesn't exist in `MavenResolverIO`
*/
package eu.fasten.core.maven.resolution;
-import static eu.fasten.core.data.metadatadb.codegen.tables.PackageVersions.PACKAGE_VERSIONS;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import eu.fasten.core.json.ObjectMapperBuilder;
+import eu.fasten.core.maven.data.Dependency;
+import eu.fasten.core.maven.data.Pom;
+import org.apache.commons.io.FileUtils;
+import org.jooq.DSLContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
@@ -25,18 +34,7 @@ import java.util.LinkedHashSet;
import java.util.Set;
import java.util.stream.Collectors;
-import org.apache.commons.io.FileUtils;
-import org.jooq.DSLContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import eu.fasten.core.json.ObjectMapperBuilder;
-import eu.fasten.core.maven.data.Dependency;
-import eu.fasten.core.maven.data.Pom;
+import static eu.fasten.core.data.metadatadb.codegen.tables.PackageVersions.PACKAGE_VERSIONS;
public class MavenResolverIO {
@@ -54,6 +52,10 @@ public class MavenResolverIO {
this.dbContext = dbContext;
this.baseDir = baseDir;
this.om = om;
+
+ if (!this.baseDir.exists()) {
+ this.baseDir.mkdir();
+ }
}
public IMavenResolver loadResolver() {
