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 220707 - Option to select CDI is not available when generating Maven Web or EAR project
Summary: Option to select CDI is not available when generating Maven Web or EAR project
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 180774 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-24 05:44 UTC by viggonavarsete
Modified: 2013-04-29 12:29 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 2012-10-24 05:44:48 UTC
When generating a Maven Web project, it is not possible to select if you should enable CDI. This is possible with a "vanilla" Web project. I think this should be consistent, and I would like the option to enable CDI in Maven projects as well.
Comment 1 viggonavarsete 2012-10-24 05:46:47 UTC
Not possible on Maven Enterprise applications either, but is possible in vanilla Java EE Enterprise applications.
Comment 2 Denis Anisimov 2012-10-24 09:28:17 UTC
That's true.
But this is not CDI functionality. 
This is JEE/Web Maven project wizard. And it has to be fixed in that area.
It's the question of beans.xml file creation.

At the moment you are still able to create beans.xml in created Maven project 
via wizard. So this option is not available just in the project wizard.
Comment 3 Martin Janicek 2012-10-24 11:13:08 UTC
*** Bug 180774 has been marked as a duplicate of this bug. ***
Comment 4 Martin Janicek 2012-10-24 11:17:38 UTC
This is valid problem, but I don't think it's a defect. We had never implemented such a feature and it implies that we would have to change wizard UI + most probably create another maven archetype for each type of project?

Or maybe the easiest way would be to use the same archetype and only create beans.xml as a "bonus" (user should be probably aware that such a change isn't a part of the chosen archetype)

Anyway, changing to enhancement and setting TM to Next
Comment 5 Martin Janicek 2013-04-11 13:54:27 UTC
Since 7.3.1 CDI will be enabled by default (beans.xml will be created directly from it's Maven archetype). Thus no option will be needed (the same solution is already done for Ant projects)

..beginning with 0.3-SNAPSHOT archetypes this is already done for App. client project, but it's not correctly generated for Web/EJB project (I forgot to add include for XML files into the archetype-metadata.xml).
Comment 6 Martin Janicek 2013-04-29 12:29:38 UTC
Since 0.4-SNAPSHOT Maven archetypes (web-main #4e82730fa894), also Web/EJB projects are including beans.xml by default. If there will be strong vote for doing the same for Java EE 6 projects, I can update their archetypes as well. Until then, closing the issue as FIXED.