package org.gozer.services;

import org.gozer.model.Dependency;
import org.kevoree.resolver.MavenResolver;
import restx.factory.Component;

import java.io.File;
import java.util.Arrays;

@Component
public class DependenciesService {

    private static final String MAVEN_CENTRAL = "http://repo1.maven.org/maven2";
    private static final String TARGET_REPOSITORY = "target/repository";

    public void resolve(Dependency dependency) {
        MavenResolver resolver = new MavenResolver();
        resolver.setBasePath(TARGET_REPOSITORY);
        File cachedFile = resolver.resolve(dependency.getMavenUrl(), Arrays.asList(MAVEN_CENTRAL));
    }

}

@@ -22,16 +22,53 @@
 vices;%0A%0A
+import org.gozer.model.Dependencies;%0A
 import o
@@ -215,16 +215,96 @@
 .Arrays;
+%0Aimport java.util.Set;%0A%0Aimport static com.google.common.collect.Sets.newHashSet;
 %0A%0A@Compo
@@ -502,79 +502,93 @@
 y%22;%0A
-%0A
     p
-ublic void resolve(Dependency dependency) %7B%0A        MavenResolver
+rivate final MavenResolver resolver;%0A%0A    public DependenciesService() %7B%0A       
  res
@@ -673,29 +673,74 @@
     
-    File cachedFile =
+%7D%0A%0A    public File resolve(Dependency dependency) %7B%0A        return
  res
@@ -817,10 +817,259 @@
 %0A    %7D%0A%0A
+    public Set%3CFile%3E resolve(Dependencies dependencies) %7B%0A        Set%3CFile%3E files = newHashSet();%0A%0A        for (Dependency dependency : dependencies.getCompile()) %7B%0A            files.add(resolve(dependency));%0A        %7D%0A%0A        return files;%0A    %7D%0A%0A
 %7D%0A

Clean up the DependenciesService to handle all Dependencies