Package org.jboss.forge.projects

Examples of org.jboss.forge.projects.AbstractProject


public class MavenProjectLocator implements ProjectLocator
{
   @Override
   public Project createProject(final DirectoryResource dir)
   {
      Project project = new AbstractProject()
      {
         @Override
         public boolean supports(ProjectFacet type)
         {
            return true;
         }

         @Override
         public DirectoryResource getProjectRoot()
         {
            return dir;
         }

         @Override
         public String toString()
         {
            return dir.toString();
         }
      };

      List<Class<? extends ProjectFacet>> result = new ArrayList<Class<? extends ProjectFacet>>();
      result.add(MavenFacetImpl.class);
      result.add(MavenMetadataFacet.class);
      result.add(MavenPackagingFacet.class);
      result.add(MavenDependencyFacet.class);
      result.add(MavenResourceFacet.class);
     
      MavenFacetImpl mavenFacetImpl = new MavenFacetImpl();
      mavenFacetImpl.setOrigin(project);
      if (!project.install(mavenFacetImpl))
      {
         throw new IllegalStateException("Could not install Maven into Project located at ["
                  + dir.getFullyQualifiedName() + "]");
      }
View Full Code Here

TOP

Related Classes of org.jboss.forge.projects.AbstractProject

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.