Package org.eclipse.m2e.wtp

Examples of org.eclipse.m2e.wtp.ResourceCleaner


      IPath facesConfigPath = new Path("WEB-INF/faces-config.xml"); //$NON-NLS-1$
      IFile defaultFacesConfig = warSourceDir.getFile(facesConfigPath);
      IFolder generatedWebResourcesFolder = ProjectUtils.getGeneratedWebResourcesFolder(mavenProject, project);
      IFile generatedFacesConfig = generatedWebResourcesFolder.getFile(facesConfigPath);
     
      ResourceCleaner cleaner = new ResourceCleaner(project);
      cleaner.addFolder(warSourceDir.getFolder("WEB-INF/lib")); //$NON-NLS-1$
      cleaner.addFiles(defaultFacesConfig, generatedFacesConfig);
     
      IStatus status = facetVersion.getConstraint().check(fproj.getProjectFacets());
      try {
        if (status.isOK()) {
          IDataModel model = createJSFDataModel(fproj,facetVersion);
          model.setBooleanProperty(IJSFFacetInstallDataModelProperties.CONFIGURE_SERVLET, false);
          fproj.installProjectFacet(facetVersion, model, monitor);
        } else {
          addErrorMarker(fproj.getProject(), NLS.bind(Messages.JSFProjectConfigurator_Marker_Facet_Version_Cant_Be_Installed, facetVersion, status.getMessage()));
          for (IStatus st : status.getChildren()) {
            addErrorMarker(fproj.getProject(), st.getMessage());
          }
        }
      } finally {
        cleaner.cleanUp();
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.m2e.wtp.ResourceCleaner

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.