| [ Web Proxy ] |
| Viewing: https://deepwiki.com/patternfly-java/patternfly-java/1.1-project-architecture | [Back] [Original] |
This document describes the multi-module Maven structure of PatternFly Java, including the parent POM hierarchy, module organization, dependency relationships, and the layered architecture that separates foundation components from UI components and integration modules. For information about the build system and development workflows, see Build System and Development. For details about GWT and J2CL integration approaches, see GWT vs J2CL.
PatternFly Java consists of 15 Maven modules organized in a hierarchical structure. The following table lists all modules with their Maven coordinates and purposes:
| Module | Artifact ID | Packaging | Purpose |
|---|---|---|---|
| Parent POMs | |||
| Root | patternfly-java-parent | pom | Root parent POM with project metadata and plugin configuration |
| Code Parent | patternfly-java-code-parent | pom | Parent for code modules with dependency management |
| BOM | patternfly-java-bom | pom | Bill of materials for dependency version management |
| Build Config | patternfly-java-build-config | jar | Shared configuration for checkstyle, license, and code quality tools |
| Foundation Layer | |||
| Core | patternfly-java-core | gwt-lib | Base classes, utilities, component foundation, Popper.js integration |
| Tokens | patternfly-java-tokens | gwt-lib | Design token enum generated from PatternFly JSON |
| Icons | patternfly-java-icons | gwt-lib | Icon factory methods generated from SVG sources (~1000+ icons) |
| UI Layer | |||
| Components | patternfly-java-components | gwt-lib | 62 UI components (buttons, forms, navigation, etc.) |
| Layouts | patternfly-java-layouts | gwt-lib | Page layouts (grid, flex, stack, etc.) |
| Charts | patternfly-java-charts | gwt-lib | Chart components with web component wrappers |
| Extensions | |||
| Code Editor | patternfly-java-codeeditor | gwt-lib | Code editor extension component |
| Finder | patternfly-java-finder | gwt-lib | Hierarchical navigation finder extension |
| Integration | |||
| GWT | patternfly-java-gwt | gwt-lib | GWT module aggregation and resource injection |
| J2CL | patternfly-java-j2cl | jar | J2CL dependency aggregation with JavaScript externs |
| Documentation | |||
| API Doc | patternfly-java-apidoc | jar | Aggregated Javadoc generation from all modules |
| Showcase | patternfly-java-showcase | jar | Demo application built with J2CL |
Sources: pom.xml113-126 README.md106-122
The project uses a multi-level parent POM hierarchy to organize build configuration, plugin management, and dependency management:
Parent POM Responsibilities:
patternfly-java-parent (Root)The root parent defines project-wide metadata, properties, and plugin configurations that apply to all modules:
apidoc, showcase, quick-build, releaseKey properties defined: pom.xml78-111
patternfly-java-code-parentExtends the root parent and provides dependency management for all code modules:
patternfly-java-build-config for license headerspatternfly-java-build-config for checkstyle rulesDependency management: code-parent/pom.xml35-64
patternfly-java-bomProvides centralized version management for all PatternFly Java artifacts. This module has an independent parent (org.jboss:jboss-parent) to avoid circular dependencies. Consumers import this BOM to ensure consistent versions across all PatternFly Java dependencies.
Dependency declarations: bom/pom.xml83-200
Sources: pom.xml23-27 code-parent/pom.xml23-33 bom/pom.xml23-28
PatternFly Java follows a strict layered architecture where higher layers depend on lower layers but never the reverse:
The foundation layer provides primitive building blocks used throughout the project:
patternfly-java-core
BaseComponent, BaseComponentSVG all UI components extend one of theseHasItems, HasIdentifier, ComponentContext, Expandable, CloseableClasses static methods generating PatternFly CSS class strings (component(), layout(), modifier(), util())Aria string constants for all ARIA attributes (aria-label, aria-expanded, aria-hidden, etc.)Version.java contains PATTERN_FLY_MAJOR_VERSION, used by Classes to prefix all CSS class namesKey files: core/src/main/java/org/patternfly/style/Classes.java23-413 core/src/main/java/org/patternfly/core/Aria.java18-47
Core module POM: core/pom.xml30-63
patternfly-java-tokens
org.patternfly.token.Token@patternfly/tokens NPM package JSONname (CSS variable), value (default), var (wrapped in var())Token enum usage: README.md257-280
patternfly-java-icons
IconSets.java, IconSpecs.java@patternfly/patternfly and @fortawesome/* packagesPredefinedIcon (extends SVG builder for customization)Icon generation: icons/pom.xml59-93
Sources: core/pom.xml30-63 tokens/pom.xml icons/pom.xml30-41
The UI layer builds on the foundation to provide user-facing components:
patternfly-java-layouts
Grid, GridItem, Flex, Stack, Split, Bullseye, Gallerypatternfly-java-coreLayout module: layouts/pom.xml30-40
patternfly-java-components
Button, Menu, Table, Modal, Navigation, WizardComponent dependencies: components/pom.xml35-51
patternfly-java-charts
@patternfly-java/charts packageCharts approach documented: README.md89-103
Sources: components/pom.xml30-57 layouts/pom.xml30-40 charts/pom.xml
Extensions provide specialized components that build on the base component library:
patternfly-java-codeeditor
patternfly-java-componentsorg.patternfly.extension.CodeEditorCode editor module: extensions/codeeditor/pom.xml30-40
patternfly-java-finder
patternfly-java-componentsorg.patternfly.extension.FinderFinder module: extensions/finder/pom.xml30-40
Sources: extensions/codeeditor/pom.xml30-40 extensions/finder/pom.xml30-40
Integration modules aggregate dependencies for different JavaScript compilation targets:
patternfly-java-gwt
gwt-lib with GWT module descriptorsources classifiersorg.patternfly.PatternFly (inheritable by GWT applications)GWT module configuration: gwt/pom.xml47-70
patternfly-java-j2cl
.js files for J2CL externs and Popper.jsJ2CL resource configuration: j2cl/pom.xml46-61
Sources: gwt/pom.xml30-83 j2cl/pom.xml30-62
The following diagram shows actual Maven dependencies between modules using the <dependency> declarations from each POM:
Key dependency patterns:
patternfly-java-core, which depends on ElementoComponents depends on Core, Icons, Tokens, and LayoutsCodeEditor and Finder depend only on ComponentsGWT and J2CL depend on Components and Layouts (but use different mechanisms)Sources: components/pom.xml35-51 gwt/pom.xml47-70 j2cl/pom.xml35-44 showcase/pom.xml57-103
PatternFly Java uses two packaging types that determine how modules are compiled and consumed:
gwt-lib PackagingModules with gwt-lib packaging are compiled by the gwt-maven-plugin:
Characteristics:
.gwt.xml module descriptor in src/main/resources.gwt-lib classifier<inherits> directiveModule Descriptor Pattern:
Each gwt-lib module defines a module name in its POM: core/pom.xml103-108
Modules Using gwt-lib:
patternfly-java-core org.patternfly.Corepatternfly-java-tokens org.patternfly.Tokenspatternfly-java-icons org.patternfly.Iconspatternfly-java-layouts org.patternfly.Layoutspatternfly-java-components org.patternfly.Componentspatternfly-java-charts org.patternfly.Chartspatternfly-java-codeeditor org.patternfly.extension.CodeEditorpatternfly-java-finder org.patternfly.extension.Finderpatternfly-java-gwt org.patternfly.PatternFlyModules with standard JAR packaging are used for J2CL compilation:
Characteristics:
src/main/resources/META-INF/externs/)j2cl-maven-plugin for JavaScript generationJ2CL Resource Configuration: j2cl/pom.xml47-60
Modules Using JAR:
patternfly-java-j2cl (aggregation module)patternfly-java-showcase (J2CL application)patternfly-java-apidoc (documentation aggregation)patternfly-java-build-config (build configuration)Sources: core/pom.xml103-108 components/pom.xml59-68 j2cl/pom.xml30-62
The patternfly-java-build-config module provides shared configuration files for code quality tools:
Configuration Resources:
etc/license.txt - Apache 2.0 license header templateetc/checkstyle-suppressions.xml - Checkstyle rule suppressionsUsage Pattern:
Code modules declare a dependency on build-config in their plugin configurations: code-parent/pom.xml70-87
This pattern allows shared configuration to be versioned and distributed with the project without duplication.
Sources: build-config/pom.xml30-52 code-parent/pom.xml70-101
Several modules use code generation during the generate-sources phase to create Java classes from external resources:
patternfly-java-core)Script: core/version.java (JBang script)
Generated: org.patternfly.core.Version.java
Input: POM version, PatternFly version from properties
Trigger: core/pom.xml81-100
patternfly-java-icons)Script: icons/generate-icons.js (Node.js script)
Generated: org.patternfly.icon.IconSets.java, org.patternfly.icon.IconSpecs.java
Input: SVG files from @patternfly/patternfly and @fortawesome/* NPM packages
Trigger: icons/pom.xml59-93
patternfly-java-tokens)Script: tokens/generate.mjs (Node.js script)
Generated: org.patternfly.token.Token.java
Input: JSON from @patternfly/tokens NPM package
Trigger: Similar pattern to icons using frontend-maven-plugin
patternfly-java-showcase)Scripts:
showcase/code.java - Generates org.patternfly.showcase.Code.java (code snippets)showcase/doc.java - Generates org.patternfly.showcase.Documentation.java (descriptions)Input: Demo files from src/demo/java/**/*Demo.java
Trigger: showcase/pom.xml126-156
All generation happens during the generate-sources phase, ensuring generated files are available for compilation.
Sources: core/pom.xml81-100 icons/pom.xml59-93 showcase/pom.xml126-156
The root POM uses Maven profiles to conditionally activate documentation modules:
apidoc ProfileActivates the patternfly-java-apidoc module for generating aggregated API documentation: pom.xml458-463
showcase ProfileActivates the patternfly-java-showcase module for building the demo application: pom.xml557-562
release ProfileConfigures release-specific plugins (GPG signing, source/javadoc JARs, Central publishing): pom.xml483-556
These modules are excluded from the default build to speed up development cycles, as they are typically only needed for releases or documentation updates.
Sources: pom.xml457-562
Refresh this wiki
Enter email to refresh| Web Proxy Viewer | New URL | Original Page |