...
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 propertiesxml |
---|
|
<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 Demoxml |
---|
|
mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org
|
CODI-Core Module (required)
Code Block |
---|
| xml |
---|
| xml |
---|
title | CODI-Core module dependenciesxml |
---|
|
<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 dependenciesxml |
---|
|
<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 dependenciesxml |
---|
|
<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 dependenciesxml |
---|
|
<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 dependenciesxml |
---|
|
<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 dependenciesxml |
---|
|
<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 projectsxml |
---|
|
<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 projectsxml |
---|
|
<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.xxml |
---|
|
<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.xxml |
---|
|
<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 modulexml |
---|
|
<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 modulexml |
---|
|
<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 modulexml |
---|
|
<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 bundlexml |
---|
|
<dependency>
<groupId>org.apache.myfaces.extensions.cdi.bundles</groupId>
<artifactId>myfaces-extcdi-bundle-alternative-configuration</artifactId>
<version>${codi.version}</version>
<scope>compile</scope>
</dependency>
|
...