Thanks George, i'll have a look at it.


2014/1/24 George Gastaldi <ggastald@redhat.com>
Hi Rafael,

Unfortulately Forge 1.x requires a pom.xml in your project, or you need to implement the required facets (DependencyFacet is one of them). Forge 2 is much more flexible, so that may be a better option for you.

Em 24/01/2014, às 13:16, Rafael Pestano <rmpestano@gmail.com> escreveu:

Hi guys,

I've created a new type of project in my forge plugin, also created a specific locator for it. After my project is found by ProjectFactory#findProjectRecursively() it tries to register every possible facet:
if (project != null)      {
         registerFacets(project);
      }
 

in registerFacet we have:
Set<Class<? extends Facet>> facets = facetFactory.getFacetTypes();

         for (Class<? extends Facet> facet : facets)
         {
            registerSingleFacet(project, facet);
         }

and i got Facet not found exception(The requested facet of type [org.jboss.forge.project.facets.DependencyFacet] was not found.), here is the stacktrace:

***ERROR*** Exception encountered: (type "set VERBOSE false" to disable stack traces)
org.jboss.forge.project.facets.FacetNotFoundException: The requested facet of type [org.jboss.forge.project.facets.DependencyFacet] was not found. The facet is not installed.
        at org.jboss.forge.project.BaseProject.getFacet(BaseProject.java:103)
        at br.ufrgs.rmpestano.intrabundle.model.OSGiProject.getFacet(OSGiProject.java:35)
        at org.jboss.forge.spec.javaee.BaseJavaEEFacet.isInstalled(BaseJavaEEFacet.java:62)
        at org.jboss.forge.project.BaseProject.registerFacet(BaseProject.java:153)
        at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
        at org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:186)
        at org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:178)
        at org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:117)
        at org.jboss.forge.shell.project.ProjectInitializer.doInit(ProjectInitializer.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

is it normal behavior of Forge(try to install all available facets) or i did something wrong?

The project type i've created is not maven based so hence dependency facet must no be installed.

the project can be found here:

https://github.com/rmpestano/intrabundle

BundlePluginTest reproduces my issue.

thanks in advance.


--
Att,

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev

_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev



--
Att,

Rafael M. Pestano

Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
Graduando em Ciência da Computação UFRGS
http://conventionsframework.org
http://rpestano.wordpress.com/
@realpestano