Back to project page m2e-android.
The source code is released under:
Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...
If you think the Android project m2e-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/******************************************************************************* * Copyright (c) 2012 Ricardo Gladwell//from ww w . j ava 2s . c o m * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ package me.gladwell.eclipse.m2e.android.project; import me.gladwell.eclipse.m2e.android.configuration.ProjectConfigurationException; import org.apache.maven.project.MavenProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.m2e.core.embedder.MavenModelManager; import com.google.inject.Inject; import com.google.inject.Singleton; @Singleton public class MavenToEclipseAndroidProjectConverter implements AndroidProjectFactory<MavenAndroidProject, EclipseAndroidProject> { private AndroidProjectFactory<MavenAndroidProject, MavenProject> mavenProjectFactory; private MavenModelManager mavenModelManager; @Inject public MavenToEclipseAndroidProjectConverter( AndroidProjectFactory<MavenAndroidProject, MavenProject> mavenProjectFactory, MavenModelManager mavenModelManager) { super(); this.mavenProjectFactory = mavenProjectFactory; this.mavenModelManager = mavenModelManager; } public MavenAndroidProject createAndroidProject(EclipseAndroidProject androidProject) { MavenProject project; try { project = mavenModelManager.readMavenProject(androidProject.getPom(), null); } catch (CoreException e) { throw new ProjectConfigurationException(e); } return mavenProjectFactory.createAndroidProject(project); } }