Package org.eclipse.m2e.core.project

Examples of org.eclipse.m2e.core.project.ProjectImportConfiguration


        String groupId = archetypeParametersPage.getGroupId();
        String artifactId = archetypeParametersPage.getArtifactId();
        String version = archetypeParametersPage.getVersion();
        String javaPackage = archetypeParametersPage.getJavaPackage();
        Properties properties = archetypeParametersPage.getProperties();
        ProjectImportConfiguration configuration = new ProjectImportConfiguration();

        IProject existingProject = ResourcesPlugin.getWorkspace().getRoot().getProject(artifactId);
        if (existingProject!=null && existingProject.exists()) {
            throw new IllegalStateException("A project with the name " + artifactId + " already exists.");
        }
View Full Code Here


public class MavenFacade {

  public void importProjects(IProgressMonitor monitor, File pomFile, String projectName, String groupId, String artifactId, String version) throws CoreException {
   
    IProjectConfigurationManager manager = MavenPlugin.getProjectConfigurationManager();
    ProjectImportConfiguration config = new ProjectImportConfiguration();
    Collection<MavenProjectInfo> infos = new ArrayList<MavenProjectInfo>();
    Model model = new Model();
    model.setGroupId(groupId);
    model.setArtifactId(artifactId);
    model.setVersion(version);
View Full Code Here

    ArrayList<MavenProjectInfo> projectInfos = new ArrayList<MavenProjectInfo>();
    projectInfos.add(projectInfo);
    ResolverConfiguration resolverConfiguration = new ResolverConfiguration();
    String activeProfiles = "pom.xml";
    resolverConfiguration.setActiveProfiles(activeProfiles);
    ProjectImportConfiguration configuration = new ProjectImportConfiguration(resolverConfiguration);

    List<IMavenProjectImportResult> importResults = MavenPlugin.getProjectConfigurationManager().importProjects(projectInfos, configuration,
        monitor);
    for (IMavenProjectImportResult importResult : importResults) {
      // skip projects which have not been properly imported
View Full Code Here

TOP

Related Classes of org.eclipse.m2e.core.project.ProjectImportConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.