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