This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195688

Summary: Add option "Enable Contexts and Dependency Injection" when generating new Maven Java JEE6 projects
Product: projects Reporter: viggonavarsete <viggonavarsete>
Component: MavenAssignee: Jesse Glick <jglick>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dkonecny, pjiricka
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description viggonavarsete 2011-02-19 08:10:24 UTC
When generating Web Application from Java Web->Web Application, the user is able to select an option "Enable Contexts and Dependency Injection". This will generate the beans.xml in WEB-INF. A similar feature should be added when generatin web applications from Maven to align the features in the IDE.
Comment 1 viggonavarsete 2011-02-19 08:45:57 UTC
Firstly I thought this was only for Web applications, but actually I think this should go for all projects wanting to take advantage of CDI. So, all Maven generated projects having the option of choosing Java EE 6 should also have an option to enable CDI (Contexts and Dependency Injection). This should generate a beans.xml in WEB-INF. The presence of a beans.xml file signals that the module contains CDI managed beans, so the classes on the path are scanned for CDI annotations. In a CDI module, all beans are registered with Weld, and the @Named annotation is used to match beans to injection points.
Comment 2 Petr Jiricka 2011-02-22 09:00:01 UTC
Sounds very similar as (if not a duplicate of) issue 180774.
Comment 3 viggonavarsete 2011-02-22 09:07:59 UTC
Yes, agree, this is a duplicate of issue 180774.
Comment 4 Petr Jiricka 2011-02-22 09:30:20 UTC

*** This bug has been marked as a duplicate of bug 180774 ***