{scrollbar}

Build MyFaces Core from source code using Maven

Myfaces is built using the Maven software project management tool. Follow these instructions to build Myfaces from source on your machine. If you just want a binary distribution, one can be downloaded from http://myfaces.apache.org/download.html.

Prerequisites

To build Myfaces, you'll need the software listed below installed on your machine.

Running a Myfaces build

svn co https://svn.apache.org/repos/asf/myfaces/current myfaces-current cd myfaces-current mvn install
  • You may need to run the 'mvn' command multiple times when you're first starting out, as it downloads plugins and the download process does not seem to be entirely reliable.
  • Use the setting -Dmaven.test.skip=true if you don't want tests to run.
  • Use the setting -Dmaven.test.failure.ignore=true if you don't want the build to stop if a test fails

The output will be put in the "target" folder of every subproject.

Building the documentation

To build the documentation site, execute:

cd myfaces-current/build mvn site

The documentation will be put in the target/site folder of every subproject.

For Tomahawk only

Currently the Tomahawk build FAILS with maven > 2.0.9 due to the incompatibility of a required plugin.

In most cases, it is best to build all the Tomahawk modules:

svn checkout http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk tomahawk cd tomahawk mvn install

If you really want to build just Tomahawk core then you will need to manually add the apache snapshot repository to your settings file. The problem is that each tomahawk
submodule needs access to its parent pom. That is no problem if the parent pom is in the parent directory (which happens if you check out the whole of tomahawk rather
than just the core module). Otherwise maven can also retrieve it from the apache snapshot repository - except that the definition for the apache snapshot repository
location is in an ancestor pom that is referenced only from the parent pom!

To enable the apache snapshot repostory, edit file ~/.m2/settings.xml and add the following:

xml <profiles> <profile> <id>mydefs</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://people.apache.org/repo/m2-snapshot-repository</url> <releases> <enabled>false</enabled> </releases> </repository> </repositories> </profile> </profiles>

IDE support

See Building_MyFaces_in_your_IDE.

{scrollbar}
  • No labels