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

Support detection/registration/installation of undeclared dependent facets

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Alpha12
    • 1.3.3.Final
    • None
    • None

      Based on FORGE-1101, facets that are not declared via @RequiresFacet may not be visible via Project.hasFacet() at the right time since the ProjectFactory's registry may not process these facets in the right order. It would be a good idea to hint the ProjectFactory that a particular Facet may have to be registered.

      To explain further, the RestFacet does not declare any dependencies on the RestWebXmlFacet and the RestApplicationFacet. These facets are therefore not always detected via the project.hasFacet() invocations.

      Declaring them as facets via a @RequiresOnlyOneFacet annotation could be one solution to ensure that only one facet within a group should be sufficient to satisfy the desired constraints on a Faceted type. Likewise, we could also add support for optional facets that are may be installed if possible, via a @OptionalFacets annotation.

      This would probably be better supported in 2.x instead of 1.x.

              lincolnthree Lincoln Baxter III (Inactive)
              vineet.reynolds_jira Vineet Reynolds (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: