Package org.eclipse.m2e.core.project

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


    IFile pomFile = basedir
        .getFile(new Path(IMavenConstants.POM_FILE_NAME));
    IMavenProjectFacade projectFacade = projectRegistry.create(pomFile,
        false, new NullProgressMonitor());
    if (projectFacade != null) {
      ResolverConfiguration configuration = projectFacade
          .getResolverConfiguration();

      String activeProfiles = configuration.getActiveProfiles();
      if (activeProfiles != null && activeProfiles.length() > 0) {
        workingCopy.setAttribute(MavenLaunchConstants.ATTR_PROFILES,
            activeProfiles);
      }
    }
View Full Code Here


    waitForJobsToComplete();
    basicTest(p);
  }

  public void testMultipleRelativeContextFolders() throws Exception {
    IProject[] projects = importProjects("projects/parent-p6", new String[]{"pom.xml", "p6/pom.xml"}, new ResolverConfiguration());
    waitForJobsToComplete();
    basicTest(projects[1]);
  }
View Full Code Here

 

  private void executeCopyResources(IMavenProjectFacade facade,  ResourceFilteringConfiguration filteringConfiguration, IPath targetFolder, List<Xpp3Dom> resources, IProgressMonitor monitor) throws CoreException {

    //Create a maven request + session
    ResolverConfiguration resolverConfig = facade.getResolverConfiguration();
   
    List<String> filters = filteringConfiguration.getFilters();
    IMavenProjectRegistry projectManager = MavenPlugin.getMavenProjectRegistry();
    MavenExecutionRequest request = projectManager.createExecutionRequest(facade.getPom(), resolverConfig, monitor);
    request.setRecursive(false);
View Full Code Here

      Job mavenJob = new Job("Configuring Maven tools") {

        @Override
        protected IStatus run(IProgressMonitor monitor) {
          try {
            ResolverConfiguration configuration = new ResolverConfiguration();
            configuration.setResolveWorkspaceProjects(true);
            configuration.setActiveProfiles("");

            IProjectConfigurationManager configurationManager = MavenPlugin.getProjectConfigurationManager();
            configurationManager.enableMavenNature(project, configuration, new NullProgressMonitor());

            configurationManager.updateProjectConfiguration(project, new NullProgressMonitor());
View Full Code Here

    }
    MavenProjectInfo parent = null;
    MavenProjectInfo projectInfo = new MavenProjectInfo(derivedProjectName, pomFile, model, parent);
    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) {
View Full Code Here

TOP

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

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.