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

Optional facets are preventing installation of facets

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 2.0.0.Final
    • Fix Version/s: 2.1.0.Final
    • Component/s: Plugin API
    • Labels:
      None

      Description

      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));
         }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gastaldi George Gastaldi
                  Reporter:
                  gastaldi George Gastaldi
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: