Apache MyFaces Tobago

Clone this repo:
  1. 5ad84d3 fix(demo): treeIcon demo looks like it's broken by Henning Noeth · 5 hours ago main
  2. 34c8bd4 build(deps): bump org.apache.tomcat:tomcat-jasper-el by dependabot[bot] · 28 hours ago
  3. 7250b4b docs: RELEASE_CHECKLIST.md by Henning Noeth · 34 hours ago
  4. c97f937 chore(release): set next SNAPSHOT version by Henning Noeth · 4 days ago
  5. ac45457 build(deps-dev): bump org.codehaus.mojo:build-helper-maven-plugin (#7830) by dependabot[bot] · 2 days ago

License Tobago CI CodeQL Build Status ASF

Apache Tobago

Apache MyFaces Tobago is a JSF component framework that pays special attention to security and is optimized for business applications.

Tobago supports custom themes based on the popular Bootstrap framework and frees the user from having to develop complex CSS and JavaScript components.

Compared to many other JSF frameworks, Tobago is still being actively developed and is used in many projects.

Getting Started

Prerequisites

  • A Git client to check out this project (may part of your IDE)
  • JDK17 or higher
  • Maven 3

Building

In the project directory you can use:

mvn clean install

to build the project with all submodules. This will put all necessary artifacts into your local repository.

If there are changes in the tobago-theme module in TypeScript or other sources, you need to build with frontend profile:

mvn clean install -Pfrontend

Live Demo

You can find a live demo of all components at https://tobago-vm.apache.org/.

Examples

See tobago-example directory for some simple examples on how to use Tobago:

mvn clean install

Jetty, MyFaces and Weld

If you want to run the demo locally you need to run the following command:

cd tobago-example/tobago-example-demo
mvn clean package jetty:run -Pjetty -Pdev

Browse to the local URL http://localhost:8080/

Jetty, MyFaces and Weld on Jakarta EE 11 basis

Run the demo with Jakarta EE 11 which includes Faces 4.1.

cd tobago-example/tobago-example-demo
mvn clean package jetty:run -Pjetty-ee11 -Pdev -Djsf=myfaces-4.1

Jetty, Mojarra and Weld

cd tobago-example/tobago-example-demo
mvn clean package jetty:run -Pjetty -Pdev -Djsf=mojarra-4.0

Browse to the local URL http://localhost:8080/

Tomcat, MyFaces and Weld

cd tobago-example/tobago-example-demo
mvn cargo:run -Ptomcat

Browse to the local URL http://localhost:8080/tobago-example-demo/

TomEE

cd tobago-example/tobago-example-demo
mvn clean package tomee:run -Ptomee

Browse to the local URL http://localhost:8080/

Open Liberty

cd tobago-example/tobago-example-demo
mvn clean package liberty:run -Pliberty

Browse to the local URL http://localhost:9080/

Quarkus

cd tobago-example/tobago-example-quarkus
mvn clean package quarkus:dev -Djsf=myfaces-4.1

Browse to the local URL http://localhost:8080/

Spring Boot 3

cd tobago-example/tobago-example-spring-boot
mvn clean package -Pspring-boot-3 spring-boot:run

Browse to the local URL http://localhost:8080/

Spring Boot 4

cd tobago-example/tobago-example-spring-boot
mvn clean package -Pspring-boot-4 spring-boot:run

Browse to the local URL http://localhost:8080/

Tomcat in Docker

mvn clean package -Pdocker
docker run -p 8080:8080 myfaces/tobago-example-demo:latest

Browse to the local URL http://localhost:8080/

Docker Compose

cd tobago-example
./buildDockerimages.sh
docker compose up

Browse to the local URL http://localhost:8080/ The different server can be accessed by increasing the port number by 1.

Integration tests

Currently, not all integration tests are migrated to Playwright. So there are Jasmine and Playwright tests.

Jasmine

cd tobago-example/tobago-example-demo
mvn clean verify -Pdocker -Pintegration-tests

Playwright

Start servers as described in Docker compose.

cd tobago-example/tobago-example-demo
npm run test
  • test with different browsers npm run test
  • test with Firefoxnpm run test:firefox
  • test with Google Chrome npm run test:chrome
  • test with different browsers on different servers npm run test:all-servers

    For Safari on macOS: The option ‘Keyboard navigation’ must be enabled

Issue Tracking

If you find any issues regarding MyFaces Tobago you can use the Apache Issue Tracker to report them.

Contributing

Pull requests are welcome; see the contributor guidelines for details.

Licensing

The terms for software licensing are detailed in the LICENSE.txt file.