Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1597

Optional facets are preventing installation of facets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 2.1.0.Final
    • 2.0.0.Final
    • Plugin API
    • None

      FacesFacet declares an optional constraint on ServletFacet. FacetFactoryImpl checks if the optional constraint is satisfied in https://github.com/forge/core/blob/master/facets/impl/src/main/java/org/jboss/forge/addon/facets/FacetFactoryImpl.java#L306 , hence not registering the candidate facet.

      This test summarizes the problem (in
      org.jboss.forge.addon.javaee.faces.FacesFacetTest):

         @Test
         public void testFacesFacetInstalledAfterProjectIsEvictedFromCache()
         {
            Project project = projectFactory.createTempProject();
            facetFactory.install(project, FacesFacet_2_2.class);
            Assert.assertTrue("Should have FacesFacet", project.hasFacet(FacesFacet.class));
            Assert.assertTrue("Should have FacesFacet_2_2", project.hasFacet(FacesFacet_2_2.class));
            projectFactory.invalidateCaches();
            project = projectFactory.findProject(project.getRootDirectory());
            Assert.assertTrue("Should have FacesFacet", project.hasFacet(FacesFacet.class));
            Assert.assertTrue("Should have FacesFacet_2_2", project.hasFacet(FacesFacet_2_2.class));
         }
      

              rhn-support-ggastald George Gastaldi
              rhn-support-ggastald George Gastaldi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: