Hi all,
I'm trying to develop a new Forge plugin. I created a new facet and used
the @RequiresFacet annotation and would like to test it.
But since the implementation of those java EE facets are in the jar
javaee-impl, it doesn't seems to get picked up by Arquillian.
Anyone an idea how I can proceed?
Thx
@Alias("xxx")
@RequiresFacet({DependencyFacet.class, ServletFacet.class,
WebResourceFacet.class})
public class XxxFacet extends BaseFacet {
}
public class XxxPluginTest extends AbstractShellTest {
@Deployment
public static JavaArchive getDeployment() {
JavaArchive archive =
AbstractShellTest.getDeployment().addPackages(true,
PrimefacesPlugin.class.getPackage());
return archive;
}
@Test
public void testCheckXxxFacet() throws Exception {
Project p = getProject();
Assert.assertNotNull(p);
}
}
Results in the following stacktrace
org.jboss.forge.project.facets.FacetNotFoundException: The requested Facet
of type [org.jboss.forge.spec.javaee.ServletFacet] could not be loaded.
at
org.jboss.forge.project.services.FacetFactory.getFacet(FacetFactory.java:87)
at
org.jboss.forge.project.services.ProjectFactory.registerSingleFacet(ProjectFactory.java:208)
at
org.jboss.forge.project.services.ProjectFactory.registerFacets(ProjectFactory.java:188)
at
org.jboss.forge.project.services.ProjectFactory.findProjectRecursively(ProjectFactory.java:129)
--
Rudy De Busscher
http://www.c4j.be