FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

patternfly-java/showcase/markdown/get-started.md at main · patternfly-java/patternfly-java · GitHub

Latest commit

 

History

History
119 lines (87 loc) · 3.73 KB

File metadata and controls

119 lines (87 loc) · 3.73 KB
id get-started
title Get started

Get started

PatternFly Java is available on Maven Central. The easiest way is to import its BOM and add a dependency for your compilation target.

Maven Setup

Import the BOM in your pom.xml. Replace ${patternfly-java.version} with the latest version from Maven Central:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.patternfly</groupId>
            <artifactId>patternfly-java-bom</artifactId>
            <version>${patternfly-java.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Then add a dependency to either

<dependency>
    <groupId>org.patternfly</groupId>
    <artifactId>patternfly-java-gwt</artifactId>
    <type>gwt-lib</type>
</dependency>

or

<dependency>
    <groupId>org.patternfly</groupId>
    <artifactId>patternfly-java-j2cl</artifactId>
</dependency>

depending on your stack. If you're using GWT, inherit from org.patternfly.PatternFly:

<module>
    <inherits name="org.patternfly.PatternFly"/>
</module>

JavaScript Dependencies

PatternFly Java has no JavaScript dependencies. Everything necessary is included in the code base for both GWT and J2CL. The only exception is the charts package, which wraps PatternFly React Chart components as web components so they can be used from Java.

npm install @patternfly-java/charts
import "@patternfly-java/charts/dist/charts";

Stylesheets

PatternFly Java does not come with PatternFly styles. You have to provide them yourself. Please follow the PatternFly getting started guide.

In addition, PatternFly Java defines a set of its own styles in the core and extensions/finder packages. Unlike other components that map to existing PatternFly components, the finder extension has no related PatternFly component and relies entirely on its own styles.

All NPM packages are published under the @patternfly-java scope and share the same version number as the Maven artifacts.

@patternfly-java/core

Bundles the PatternFly Java CSS stylesheets required by PatternFly Java components and layouts.

npm install @patternfly-java/core
import "@patternfly-java/core";

@patternfly-java/finder

Provides the CSS for the finder extension. Only needed if you use the finder component.

npm install @patternfly-java/finder
import "@patternfly-java/finder";

Modules

PatternFly Java consists of these Maven modules (a-z):

Module Description
patternfly-java-bom Bill of materials
patternfly-java-charts Charts
patternfly-java-codeeditor Code editor extension
patternfly-java-components Components
patternfly-java-core Core classes
patternfly-java-finder Finder extension
patternfly-java-gwt GWT support
patternfly-java-icons Icons
patternfly-java-j2cl J2CL support
patternfly-java-layouts Layouts
patternfly-java-tokens Tokens

Here's the dependency graph of these maven modules and their external dependencies:


Back | FazBrowse Home | New Git URL