Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9483

CDI extensions are not loaded if they are declared in a source folder.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M3
    • 3.3.0.M3
    • cdi-extensions
    • None

      CDI extensions are loaded only if they are declared in jar files. We should load them from source folders too.

      EXECUTE: Create two CDI projects: Project A and B. Project A should be included in the class path of project B.
      EXECUTE: Create a file A/<sourceFolder>/META-INF/services/javax.enterprise.inject.spi.Extension
      EXECUTE: Add the following text to the service file:

      org.jboss.seam.servlet.ServletExtension
      

      EXECUTE: Create any bean in project B and add the following injection point to the bean:

      @Inject @RequestParam("id")
      private String bookId;
      

      ASSERT: bookId is not marked as unsatisfied dependency. <- Failure
      EXECUTE: Remove A/<sourceFolder>/META-INF/services/javax.enterprise.inject.spi.Extension
      EXECUTE: Build the projects.
      ASSERT: bookId is marked as unsatisfied dependency.

            jjankovi Jaroslav Jankovič (Inactive)
            alexeykazakov Alexey Kazakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: