This section describes how to build Tobago and run the example applications from the sources. Check out the current development sources by running the following:

    $ git clone https://github.com/apache/myfaces-tobago tobago

Check out the 4.x sources by running the following:

    $ git clone -b tobago-4.x https://github.com/apache/myfaces-tobago tobago-4.x

Check out the 3.x sources by running the following:

    $ git clone -b tobago-3.x https://github.com/apache/myfaces-tobago tobago-3.x

Check out the 2.x sources by running the following:

    $ git clone -b tobago-2.x https://github.com/apache/myfaces-tobago tobago-2.x

You need (at least version 3.0.4) and Java (version 8 or higher) to build Tobago.

Change to the local loaded source directory and call

    $ mvn

or

    $ mvn clean install

to run the install target on all sub projects. This will download all necessary artifacts into your local Maven repository.

You can run the examples inside tobago-example with jetty

    $ mvn jetty:run

or

    $ mvn package

and deploy the WAR from the target directory manually. By default the example will be started with MyFaces 2.0 You can run the examples with other version like you see here:

    $ mvn jetty:run

You can select a specific MyFaces version with the jsf variable.

    $ mvn jetty:run -Djsf=myfaces-2.1
    $ mvn jetty:run -Djsf=myfaces-2.2
    $ mvn jetty:run -Djsf=myfaces-2.3

Or you can select Mojarra with a specific version.

    $ mvn jetty:run -Djsf=mojarra-2.0
    $ mvn jetty:run -Djsf=mojarra-2.1
    $ mvn jetty:run -Djsf=mojarra-2.2
    $ mvn jetty:run -Djsf=mojarra-2.3

because of `java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter`, which is a problem with Jigsaw.

It's also possible to run the demo in TomEE from Maven directly

    $ mvn clean package tomee:run -Djsf=provided