This page provides an orientation to the development environment for patternfly-java contributors and library developers. It covers the required toolchain, how the modules are built together, and how the showcase application is run locally. For detailed step-by-step setup instructions, see Local Development Setup. For the showcase-specific workflow, see Showcase Application Development. For a comparison of the two compilation targets, see GWT vs J2CL.
The project requires three tools installed on the host machine. Node.js is provisioned automatically by frontend-maven-plugin for modules that need it; you do not need to install Node.js manually for most tasks.
| Tool | Minimum Version | Configuration Source |
|---|---|---|
| JDK | 21 | <java.version>21</java.version> in pom.xml106 |
| Apache Maven | 3.9.9 | <maven.min.version>3.9.9</maven.min.version> in pom.xml108 |
| Node.js | v24.10.0 | <version.node>v24.10.0</version.node> in pom.xml87 |
The maven-enforcer-plugin validates the Java and Maven version constraints at build initialization time (initialize phase) and fails the build if they are not met. See pom.xml257-285
The repository is a Maven multi-module project. The top-level pom.xml lists all library modules as direct children. The showcase module is gated behind the -P showcase Maven profile and is not built by default.
Standard module build (default profile)
mvn install
Full build including showcase
mvn install -P showcase
Quick build (skip checks and tests)
mvn install -Dquickly
The -Dquickly property activates the quick-build profile pom.xml465-481 which disables checkstyle, editorconfig, import sorting, license checks, Javadoc generation, and all tests.
Sources: pom.xml113-126 pom.xml457-481 pom.xml557-562
The following diagram maps each Maven module to its artifact ID and source directory, showing the module boundaries that developers work within.
Maven module → source directory mapping
Sources: pom.xml113-126 pom.xml557-562 core/pom.xml30-32 j2cl/pom.xml30-33 gwt/pom.xml30-33 showcase/pom.xml24-28
patternfly-java produces output for two distinct Java-to-JavaScript compilation toolchains. Each has its own Maven module that acts as the consumer-facing dependency.
| Aspect | GWT | J2CL |
|---|---|---|
| Maven artifact | patternfly-java-gwt | patternfly-java-j2cl |
| Packaging | gwt-lib | jar |
| Module POM | gwt/pom.xml | j2cl/pom.xml |
| GWT module descriptor | org.patternfly.PatternFly | — |
| Used by showcase | No (removed in 0.3.0) | Yes |
| Popper.js injection | ScriptInjector (GWT API) | Bundled JS resource |
Both modules depend on patternfly-java-components and patternfly-java-layouts. The GWT module additionally depends on gwt-user. See GWT vs J2CL for a detailed comparison.
Sources: gwt/pom.xml47-70 j2cl/pom.xml35-44
There are two distinct development workflows depending on what is being changed.
Library module development workflow
Showcase application development workflow
In development mode, two processes must run concurrently:
mvn j2cl:watch -P showcase — starts J2CL incremental compilation in watch mode; wait for Build Complete: ready for browser refresh before proceeding.cd showcase && npm run watch — starts the Parcel bundler and the Express dev server at http://localhost:1234.Sources: showcase/README.md7-30 showcase/server.js1-63 showcase/pom.xml202-218
The Express server in showcase/server.js routes requests to the appropriate backend based on URL pattern.
showcase/server.js routing logic
Sources: showcase/server.js24-58
For a production build with full Closure compiler optimizations applied by J2CL:
mvn clean package -P showcase,prod
The prod profile showcase/pom.xml222-250 switches the J2CL compilation level from BUNDLE_JAR to ADVANCED_OPTIMIZATIONS and disables incremental builds. It also invokes npm run prod via frontend-maven-plugin to run Parcel in production mode.
To serve the production build locally after it completes:
cd showcase
mvn com.github.eirslett:frontend-maven-plugin:npm@http-server
Then open https://localhost:8080.
Sources: showcase/README.md33-43 showcase/pom.xml222-250
| Goal | Command |
|---|---|
| Build all library modules | mvn install |
| Build all modules, skip checks/tests | mvn install -Dquickly |
| Build showcase (dev mode, J2CL watch) | mvn j2cl:watch -P showcase |
| Start Parcel + dev server for showcase | cd showcase && npm run watch |
| Build showcase for production | mvn clean package -P showcase,prod |
| Serve production showcase build | cd showcase && mvn com.github.eirslett:frontend-maven-plugin:npm@http-server |
| Generate aggregate Javadoc | mvn package -P apidoc |
Sources: pom.xml457-562 showcase/README.md1-43 showcase/pom.xml222-250