UI-Component Sets

Overview

MyFaces uses Ant to build from the source. Click here for more information on Apache Ant. These instructions also assume you have already checked out the source code. If you have not done this, please see the SVN instructions here.

There are two ways to build MyFaces. The first is from the "top level" build directory which is used to build "all" of the subprojects in the correct order. The other method is to build one or more subprojects directly.

"One Build To Rule Them All"

MyFaces uses a single build file to build all of the subprojects. This build file is available in all of the subprojects and is shared through the magic of svn:externals. If you are interested in building everything then you want to execute the build from the "top level" build directory. This is the build directory immediately under the directory you check out the current SVN code to.

Most of the targets in the build script have an "all" version that can be used to build all of the subprojects: clean-all, javadoc-all, dist-all etc.

                svn co https://svn.apache.org/repos/asf/myfaces/current myfaces-current
                cd myfaces-current/build
                ant download-dependencies dist-all
            

You can also build the subprojects individually by using the build file contained in the relevant subproject's build directory. There are some restrictions on this, however, as not all of the subprojects can be built independently. For certain subprojects, the order is important.

Example: You want to build myfaces-impl.jar. This requires the API to compile so you would need to build the API subproject first.

                svn co https://svn.apache.org/repos/asf/myfaces/current myfaces-current
                cd myfaces-cuurent/api/build
                ant download-dependencies
                ant dist
                cd ../../
                cd impl
                ant dist
            

Dependencies

There are several third party JAR files that MyFaces depends on (for a complete list see the comments in the build.xml file.) The simplest way to obtain these jar files is to run ant download-dependencies from the top level build directory. This will create a lib directory that will automatically be used by the Ant script when building. Normally this is a one-time step but you may want to occassionally run this target to make sure the dependencies have not changed (especially if you are unable to build all of a sudden.)

It is not required that you use the download-dependencies target. The build.default.properties file contains a list of the jar file dependencies. By default it points to the top level lib directory. So to use your own local JAR files you have three options:

  • Create a top level lib directory and copy your jars into it (editing the build.default.properties file if necessary.)
  • Create/edit the build.properties file in your home directory so that each entry in build.default.properties file is accounted for and points to the appropriate location on your machine.
  • Create/edit the build.local.properties file in your build directory so that each entry in build.default.properties file is accounted for and points to the appropriate location on your machine.