Clone wiki

AspectFaces / 2.Installation

2. Installation

Aspect Faces uses Maven build mechanism and each our build is automatically published into CodingCrayons Maven repository. Both stables and snapshots. To see project condition feel free to check out our continuous integration server and for all published versions please checkout Maven repository.

Attach to project

For use of the framework in Maven based project, you have to specify Maven repository and dependency shown later. For non-maven projects, you have to download the release from our repository and attach it yourself.

Maven repository declaration

    <name>CodingCrayons Maven Repository</name>

Maven dependency for integration with JSF2


If you are not comfortable with JavaServer Faces 2.1 or want to use it without them then you may attach only some subset of this meta-package, such as core and annotation-descriptors. The bad side this is unsupported on-demand compilation because by now we support it only for JSF 2.1.

Basic Configuration

Now you have attached Aspect Faces binaries to your project and you need to perform a basic setup. It consists of couple steps:

  1. Download our basic setup package for Maven-based project. It contains all necessary configuration. Merge this package with your Maven project directory
    • in /src/main/resources is located with basic configuration of project structure
    • in /src/main/webapp/WEB-INF/ is file aspectfaces.taglib.xml containing JSF extension with new component handler
    • in /src/main/webapp/WEB-INF/ is file aspectfaces-config.xml containing list of AF profiles and used annotation descriptors
    • in /src/main/webapp/WEB-INF/ is directory af are defined widget profiles and templates. Feel free to inspect it and modify
  2. Update web.xml file. Insert following code snippets:

Aspect Faces Listener

    <!-- Include Aspect Faces listener to perform proper framework initialization during application start -->

Use taglib with AF component

    <!-- aspect faces components and namespaces have to be registered via taglib -->

Do not forget to properly use project stage configuration

    <!-- in development mode is disabled cache, in production environment it is cached forever -->

Now you have properly defined Aspect Faces project and it is ready to use. Now please check your configuration, especially profiles and widget templates and customize them for your purposes including functionality and styling.