Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

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

Code Block
xmlxml
titleOptional properties
xml
<properties>
    <codi.version>1.0.3</codi.version>
</properties>

...

JEE5 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.

xml
Code Block
xml
titleArchetype for creating a Hello-World CODI/OWB Demo
xml
mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org

CODI-Core Module (required)

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

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

...

CODI for JSF 1.2 (optional)

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

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

CODI for JSF 2.0 or 2.1 (optional)

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

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

CODI Bean-Validation (JSR-303) Module (optional)

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

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

CODI Scripting (JSR-223) Module (optional)

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

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

CODI Message (Advanced I18N) Module (optional)

xml
Code Block
xml
titleCODI-Message module dependencies
xml
<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>

...

Only use this bundle or the core and the single modules - but don't use both!

xml
Code Block
xml
titleOPTIONAL all-in-one dependency for JSF 1.2 projects
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
    <artifactId>myfaces-extcdi-bundle-jsf12</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

or

xml
Code Block
xml
titleOPTIONAL all-in-one dependency for JSF 2.0 projects
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
    <artifactId>myfaces-extcdi-bundle-jsf20</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

...

Entries for CODI v0.9.x (deprecated)

xml
Code Block
xml
titleOPTIONAL all-in-one dependency for JSF 1.2 projects - for CODI 0.9.x
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi</groupId>
    <artifactId>myfaces-extcdi-dist-jsf12</artifactId>
    <version>0.9.5</version>
    <scope>compile</scope>
</dependency>

or

xml
Code Block
xml
titleOPTIONAL all-in-one dependency for JSF 2.0 projects - for CODI 0.9.x
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi</groupId>
    <artifactId>myfaces-extcdi-dist-jsf20</artifactId>
    <version>0.9.5</version>
    <scope>compile</scope>
</dependency>

...

Alternative-Implementation (optional)

xml
Code Block
xml
titleOPTIONAL Alternative-Implementation module
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
    <artifactId>myfaces-extcdi-alternative-implementation-module</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

...

Alternative Core configuration module (optional)

xml
Code Block
xml
titleOPTIONAL Core Alternative-configuration module
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
    <artifactId>myfaces-extcdi-core-alternative-configuration</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

Alternative Jsf configuration module (optional)

xml
Code Block
xml
titleOPTIONAL JSF Alternative-configuration module
xml
<dependency>
    <groupId>org.apache.myfaces.extensions.cdi.modules.alternative</groupId>
    <artifactId>myfaces-extcdi-jsf-alternative-configuration</artifactId>
    <version>${codi.version}</version>
    <scope>compile</scope>
</dependency>

...

Only use this bundle or the single config modules - but don't use both!

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

...