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 - Add option "Enable Contexts and Dependency Injection" when generating new Maven Java JEE6 projects
Summary: Add option "Enable Contexts and Dependency Injection" when generating new Mav...
Status: RESOLVED DUPLICATE of bug 180774
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-19 08:10 UTC by viggonavarsete
Modified: 2011-02-22 09:30 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***