0 Replies Latest reply on Oct 18, 2013 9:48 AM by Shay Matasaro

    ProcessInjectionTarget event not firing for CDI extension

    Shay Matasaro Newbie



      I am using maven to build my projects and reference a CDI extension. Here is how my project is structured :


      Project Child depends on a CDI extension , specifically the Camel-CDI extension. This extension uses the ProcessInjectionTarget event  to inject certain annotated fields.


      Project Parent depends on project Child , and uses the Weld SE container (version 2.0.4)


      When I run project Parent I can see that the extension is not receiving ProcessInjectionTarget events .Other CDI events are being fired.


      In order to debug , I have built the CDI extension locally , and added it to Project Parent via the build-path->required projects dialogue, and surprisingly when the extension is added to the required projects via eclipse , the ProcessInjectionTarget  are firing properly.


      The only difference that I can see is in the runtime classpath where the first option point to the extension Jar, and in the second option it points to the target/classes and target/test-classes. The Jar obviously does not contain the test-classes.


      I also created a different Parent project which is a web project deployed on Jboss 7 and uses the provided Weld lib.when running this project config the ProcessInjectionTarget  events work fine.


      Any suggestions?  is this a bug or some kind of CDI extension limitation?