Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MyFaces CODI consists of the following modules:

Required modules:

Optional modules:

Optional configuration modules:

  • Alternative-Implementation
  • JSF-Alternative-configuration
  • Core-Alternative-configuration

Scroll down to see how to add those modules to your project.

Configuration - Getting Started (with Maven)

It's quite easy to add CODI to your project. Just add the core as well as the module/s of your choice to the pom.xml of your project.

Hint
In the listings below replace the placeholders for the version with the version of your choice or use:

Code Block
xml
xml
titleOptional properties

<properties>
    <codi.version>1.0.0-SNAPSHOT</codi.version>
</properties>

With JEE6+

If you are using CODI in a JEE6 environment, you don't need to configure a CDI implementation explicitly because it's shipped with the container. For some JEE6 application servers (esp. Glassfish v3) it's suggested to use the all-in-one dist package instead of the fine grained modules (due to server related issues).

Without JEE6+

DonJEE5 application servers as well as pure servlet containers like Apache Tomcat don't provide a CDI implementation out-of-the-box. So don't forget to setup the CDI implementation of your choice. If you would like to use CODI in combination with OpenWebBeans, you can also use the archetype provided by MyFaces.

...

Code Block
xml
xml
titleCODI-Message module dependencies
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
    <artifactId>myfaces-extcdi-message-module-api</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
    <artifactId>myfaces-extcdi-message-module-impl</artifactId>
    <version>${codi.version}</version>
    <scope>runtime</scope>
</dependency>

Hint
Replace the placeholders for the version with the version of your choice or use:

Code Block
xmlxml
titleOptional properties

<properties>
    <codi.version>1.0.0-SNAPSHOT</codi.version>
</properties>

CODI pre-packaged bundles

...

Code Block
xml
xml
titleOPTIONAL all-in-one dependency Alternative-configuration bundle
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
    <artifactId>myfaces-extcdi-bundle-alternative-configuration</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

Configuration - Getting Started (without Maven)

You can manually download all JARs described above from the maven repository or you use one of the available download mirrors for binary and source artifacts which bundle all JARs.