...
Hint
In the listings below replace the placeholders for the version with the version of your choice or use:
Code Block |
---|
| xml | xml |
---|
title | Optional 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.
Code Block |
xml |
---|
| xml |
---|
title | Archetype for creating a Hello-World CODI/OWB Demo |
---|
| xml |
---|
|
mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org
|
CODI-Core Module (required)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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)
Code Block |
xml |
---|
| xml |
---|
title | CODI-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!
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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)
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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)
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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)
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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)
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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!
Code Block |
xml |
---|
| xml |
---|
title | OPTIONAL 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>
|
...