// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void debug(String message) {
//     if(DEBUG) {
//         log.log(status(Status.INFO, "[DEBUG] " + message));
//     }
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void warn(String message) {
//     log.log(status(Status.WARNING, message));
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/Dependency.java
// public interface Dependency {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isLibrary();
// 
//     public String getPath();
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


import static me.gladwell.eclipse.m2e.android.Log.debug;
import static me.gladwell.eclipse.m2e.android.Log.warn;
import static org.eclipse.jdt.core.IClasspathEntry.CPE_LIBRARY;
import java.util.ArrayList;
import java.util.List;
import me.gladwell.eclipse.m2e.android.project.AndroidProjectFactory;
import me.gladwell.eclipse.m2e.android.project.Dependency;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.project.MavenProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IMavenProjectRegistry;
import com.google.inject.Inject;

            if (mavenProjectFacade == null) {
                warn("maven project not yet registered for " + project);
                return processed;
            }

            MavenProject mavenProject = mavenProjectFacade.getMavenProject(new NullProgressMonitor());
            MavenAndroidProject androidProject = factory.createAndroidProject(mavenProject);
            List<ArtifactRepository> repositories = mavenProject.getRemoteArtifactRepositories();

            for(IClasspathEntry entry: classpath) {
                try {
                    if(CPE_LIBRARY == entry.getEntryKind() && !attacher.isAttached(entry)) {
                        Dependency dependency = findDependency(entry, androidProject.getNonRuntimeDependencies());
                        if(!maven.isUnavailable(dependency.getGroup(),
                                dependency.getName(),
                                dependency.getVersion(),
                                "jar",
                                classifier,
                                repositories)) {
                            Artifact docs = maven.resolve(dependency.getGroup(),
                                                                    dependency.getName(),
                                                                    dependency.getVersion(),
                                                                    "jar",
                                                                    classifier,
                                                                    repositories,
                                                                    new NullProgressMonitor());

                            processed.add(attacher.attach(entry, docs));
                        } else {
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void debug(String message) {
//     if(DEBUG) {
//         log.log(status(Status.INFO, "[DEBUG] " + message));
//     }
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/Log.java
// public static void warn(String message) {
//     log.log(status(Status.WARNING, message));
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/Dependency.java
// public interface Dependency {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isLibrary();
// 
//     public String getPath();
// }
// 
// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/project/MavenAndroidProject.java
// public interface MavenAndroidProject {
// 
//     public String getName();
// 
//     public String getGroup();
// 
//     public String getVersion();
// 
//     public boolean isAndroidProject();
// 
//     public boolean isLibrary();
// 
//     public List<Dependency> getNonRuntimeDependencies();
// 
//     public List<Dependency> getLibraryDependencies();
// 
//     public File getAssetsDirectory();
// 
//     public File getResourceFolder();
// 
//     public File getAndroidManifestFile();
//     
//     public File getDestinationManifestFile();
// 
//     public List<String> getPlatformProvidedDependencies();
// 
//     public List<String> getSourcePaths();
//     
//     public String getOutputDirectory();
// 
//     public boolean isIgnoreOptionalWarningsInGenFolder();
// 
//     public List<String> getTestSourcePaths();
// 
//     public List<String> getResourcePaths();
// 
//     public List<String> getTestResourcePaths();
// 
// }


// Path: me.gladwell.eclipse.m2e.android/src/main/java/me/gladwell/eclipse/m2e/android/configuration/ClasspathAttacher.java
import static me.gladwell.eclipse.m2e.android.Log.debug;
import static me.gladwell.eclipse.m2e.android.Log.warn;
import static org.eclipse.jdt.core.IClasspathEntry.CPE_LIBRARY;
import java.util.ArrayList;
import java.util.List;
import me.gladwell.eclipse.m2e.android.project.AndroidProjectFactory;
import me.gladwell.eclipse.m2e.android.project.Dependency;
import me.gladwell.eclipse.m2e.android.project.MavenAndroidProject;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.project.MavenProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IMavenProjectRegistry;
import com.google.inject.Inject;


            if (mavenProjectFacade == null) {
                warn("maven project not yet registered for " + project);
                return processed;
            }

            MavenProject mavenProject = mavenProjectFacade.getMavenProject(new NullProgressMonitor());
            MavenAndroidProject androidProject = factory.createAndroidProject(mavenProject);
            List<ArtifactRepository> repositories = mavenProject.getRemoteArtifactRepositories();

            for(IClasspathEntry entry: classpath) {
                try {
                    if(CPE_LIBRARY == entry.getEntryKind() && !attacher.isAttached(entry)) {
                        Dependency dependency = findDependency(entry, androidProject.getNonRuntimeDependencies());
                        if(!maven.isUnavailable(dependency.getGroup(),
                                dependency.getName(),
                                dependency.getVersion(),
                                "jar",
                                classifier,
                                repositories)) {
                            Artifact docs = maven.resolve(dependency.getGroup(),
                                                                    dependency.getName(),
                                                                    dependency.getVersion(),
                                                                    "jar",
                                                                    classifier,
                                                                    repositories,
                                                                    new NullProgressMonitor());

                            processed.add(attacher.attach(entry, docs));
                        } else {
                            debug(classifier + " unavailable for classpath entry=[" + entry + "]");