Help

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Create a CDI and JSF 2.0 project using m2eclipse

m2eclipse is the Eclipse plugin for Maven 2. It allows you to create, import and manage Maven 2 projects. In this case, we are interested in creating a Maven 2 project.

To get started, add the m2eclipse update site to Eclipse and install the m2eclipse plugin and required dependencies. Once that is installed, you'll be ready to create a new CDI and JSF 2.0 project using Eclipse.

Begin by selecting New > Project... from the File menu. Now, follow the screens (left to right, top to bottom) below to create a minimal Java EE 6 project using the jboss-javaee6-webapp.

NOTE

Replace references to weld-jsf-jee-minimal with jboss-javaee6-webapp in the screenshots below.
The groupId (or package) you choose for your project must be a valid Java package name!

The resulting project with have the following structure.

You can now build the project just like a normal Maven 2 project, either from the command line or using the m2eclipse plugin controls.

Create a CDI and JSF 2.0 project using NetBeans

NetBeans 6.8 includes support for Maven 2 out of the box. It allows you to create, open and manage Maven 2 projects just like regular projects. Once again, we are interested in creating a Maven 2 project.

So you are all set to create a new CDI and JSF 2.0 project using NetBeans if you have NetBeans 6.8 (with the bundled GlassFish V3) installed!

Begin by selecting New Project... from the File menu. Now, follow the screens below to create a minimal Java EE 6 project using the weld-jee-minimal archetype.

The groupId (or package) you choose for your project must be a valid Java package name!

Here is what the resulting project will look like:

Now, there is one small tweak that you have to make. Open pom.xml and remove the <dependency> for org.glassfish.web:el-impl since GlassFish already provides an EL implementation (the correct one).

Now, you can simply right click and run the application on GlassFish V3. GlassFish will start automatically if it isn't already running.

Happy developing!