Building with Maven
Please make sure that you are using Maven 2.2 for building MyFaces CODI.
If the builds run out of memory, you should use the following settings:
The local Maven Repository contains the fine grained modules as well as pre-configured all-in-one JAR files.
The CODI Modules - Overview and Configuration pages shows how to include CODI in a project.
Details about different JDK versions
Compiling CODI with JDK 1.6+
It works out of the box - see the descriptions above.
Compiling CODI with JDK 1.5
Since v1.0.1+ CODI is compatible with Java 1.5. Even though you compile it with JDK 1.6, the build is configured to produce Java 1.5 compatible bytecode. However, if you have to compile it on your own and your company doesn't allow you to use JDK 1.6 for it, you have to do some adjustments:
- Remove modules which don't support Java 1.5 or which are using dependencies which aren't compatible (currently: the scripting module and the test modules if you don't change them to use e.g. a version of cargo which is compatible with Java 1.5)
- Add jsr250-api to modules which use @PostConstruct and @PreDestroy (JDK 1.5 doesn't ship those annotations out-of-the-box) - groupId: javax.annotation artifactId: jsr250-api version: 1.0
- Remove the call symbols.setExponentSeparator in DefaultNumberFormatter - that's not available in Java 1.5
- Use mvn clean install -Dmaven.test.skip=true for building it to skip the tests because they use Java 1.6 features
As mentioned before, you don't have to do that if you are using released artifacts or snapshots of the snapshot repository. And you also don't have to do it, if you can use JDK 1.6 just for the build process.