| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b84fbc3 commit 2756fce
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,9 +13,9 @@ PatternFly Java is a pure Java implementation of [PatternFly](https://www.patter | |||
| 13 | 13 | | `mvn clean verify` | Full build (tests, javadoc — no formatting/linting) | | |
| 14 | 14 | | `mvn verify -Dquickly` | Quick build (skip tests, javadoc) | | |
| 15 | 15 | | `mvn process-sources -P format,showcase` | Auto-format sources (editorconfig, imports, license headers) | | |
| 16 | - | `mvn process-sources -P check,showcase` | Validate sources (enforcer, checkstyle, editorconfig, imports, license) | | ||
| 16 | + | `mvn test -P check,showcase` | Validate sources (enforcer, checkstyle, editorconfig, imports, license, snippet validation) | | ||
| 17 | 17 | | `./format.sh` | Shortcut for `mvn process-sources -P format,showcase` | | |
| 18 | - | `./check.sh` | Shortcut for `mvn process-sources -P check,showcase` | | ||
| 18 | + | `./check.sh` | Shortcut for `mvn test -P check,showcase` | | ||
| 19 | 19 | | `mvn test -Dtest=ModifierTest` | Run a single test class | | |
| 20 | 20 | | `mvn test -Dtest=ModifierTest#testModifiers` | Run a single test method | | |
| 21 | 21 | | `mvn j2cl:watch -P showcase` | Watch J2CL compilation for showcase dev | | |
@@ -36,6 +36,7 @@ Uses Maven Wrapper (`mvnw`). Requires Java 21+ and Maven 3.9.9+. | |||
| 36 | 36 | - **charts** - Chart web components wrapper — standalone NPM package (`@patternfly-java/charts`), built and published independently with pnpm, not part of the Maven build lifecycle | |
| 37 | 37 | - **extensions/codeeditor**, **extensions/finder** - Extensions | |
| 38 | 38 | - **gwt**, **j2cl** - Compilation target support | |
| 39 | + - **snippet-tests** - Build-time validation of inline JavaDoc code snippets (activated via `-P check` profile, not deployed) | ||
| 39 | 40 | - **showcase** - Interactive demo website (activated via `-P showcase` profile) | |
| 40 | 41 | ||
| 41 | 42 | ## Architecture & Patterns | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -94,4 +94,4 @@ parse_params() { | |||
| 94 | 94 | ||
| 95 | 95 | parse_params "$@" | |
| 96 | 96 | setup_colors | |
| 97 | - mvn process-sources -P check,showcase | ||
| 97 | + mvn test -P check,showcase | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,13 +38,13 @@ | |||
| 38 | 38 | * import static org.patternfly.component.icon.IconSize.sm; | |
| 39 | 39 | * import static org.patternfly.component.icon.IconSize.xl; | |
| 40 | 40 | * import static org.patternfly.icon.IconSets.rhUi.checkCircleFill; | |
| 41 | - * import static org.patternfly.icon.IconSets.fas.cog; | ||
| 41 | + * import static org.patternfly.icon.IconSets.fas.gear; | ||
| 42 | 42 | * import static org.patternfly.icon.IconSets.rhUi.errorFill; | |
| 43 | 43 | * import static org.patternfly.style.Status.danger; | |
| 44 | 44 | * import static org.patternfly.style.Status.success; | |
| 45 | 45 | * | |
| 46 | 46 | * // Basic icons | |
| 47 | - * Icon settingsIcon = icon(cog()); | ||
| 47 | + * Icon settingsIcon = icon(gear()); | ||
| 48 | 48 | * | |
| 49 | 49 | * // Icons with sizes | |
| 50 | 50 | * Icon smallIcon = icon(checkCircleFill()).size(sm); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,7 @@ | |||
| 21 | 21 | import org.jboss.elemento.ElementContainerDelegate; | |
| 22 | 22 | import org.patternfly.component.Expandable; | |
| 23 | 23 | import org.patternfly.handler.ToggleHandler; | |
| 24 | + | ||
| 24 | 25 | import elemental2.dom.Element; | |
| 25 | 26 | import elemental2.dom.Event; | |
| 26 | 27 | import elemental2.dom.HTMLElement; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,7 +48,7 @@ | |||
| 48 | 48 | * import static org.patternfly.component.togglegroup.ToggleGroup.toggleGroup; | |
| 49 | 49 | * import static org.patternfly.component.togglegroup.ToggleGroupItem.toggleGroupItem; | |
| 50 | 50 | * import static org.patternfly.icon.IconSets.rhUi.copy; | |
| 51 | - * import static org.patternfly.icon.IconSets.fas.undo; | ||
| 51 | + * import static org.patternfly.icon.IconSets.rhUi.undo; | ||
| 52 | 52 | * | |
| 53 | 53 | * ToggleGroup iconGroup = toggleGroup(multi) | |
| 54 | 54 | * .addItem(toggleGroupItem("copy").iconAndText(copy(), "Copy")) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ | |||
| 32 | 32 | * <p>Create a tooltip attached to a trigger element: | |
| 33 | 33 | * | |
| 34 | 34 | * {@snippet : | |
| 35 | - * import static org.jboss.elemento.By; | ||
| 35 | + * import org.jboss.elemento.By; | ||
| 36 | 36 | * import static org.patternfly.component.button.Button.button; | |
| 37 | 37 | * import static org.patternfly.component.tooltip.Tooltip.tooltip; | |
| 38 | 38 | * | |
@@ -43,7 +43,7 @@ | |||
| 43 | 43 | * <p>Create a tooltip with placement and dynamic content: | |
| 44 | 44 | * | |
| 45 | 45 | * {@snippet : | |
| 46 | - * import static org.jboss.elemento.By; | ||
| 46 | + * import org.jboss.elemento.By; | ||
| 47 | 47 | * import static org.patternfly.component.tooltip.Tooltip.tooltip; | |
| 48 | 48 | * import static org.patternfly.style.Placement.bottom; | |
| 49 | 49 | * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,7 @@ | |||
| 49 | 49 | * import static org.patternfly.icon.IconSets.fas.cube; | |
| 50 | 50 | * import static org.patternfly.icon.IconSets.fas.flag; | |
| 51 | 51 | * import static org.patternfly.icon.IconSets.fas.globe; | |
| 52 | - * import static org.patternfly.icon.IconSets.fas.plusCircle; | ||
| 52 | + * import static org.patternfly.icon.IconSets.fas.circlePlus; | ||
| 53 | 53 | * import static org.patternfly.icon.IconSets.patternfly.key; | |
| 54 | 54 | * | |
| 55 | 55 | * DescriptionList dl = descriptionList() | |
@@ -66,7 +66,7 @@ | |||
| 66 | 66 | * .addGroup(descriptionListGroup() | |
| 67 | 67 | * .addTerm(descriptionListTerm("Pod selector").icon(globe())) | |
| 68 | 68 | * .addDescription(descriptionListDescription() | |
| 69 | - * .add(button().iconAndText(plusCircle(), "app=MyApp", start) | ||
| 69 | + * .add(button().iconAndText(circlePlus(), "app=MyApp", start) | ||
| 70 | 70 | * .inline().link()))) | |
| 71 | 71 | * .addGroup(descriptionListGroup() | |
| 72 | 72 | * .addTerm(descriptionListTerm("Annotation").icon(flag())) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -404,6 +404,9 @@ | |||
| 404 | 404 | </profile> | |
| 405 | 405 | <profile> | |
| 406 | 406 | <id>check</id> | |
| 407 | + <modules> | ||
| 408 | + <module>snippet-tests</module> | ||
| 409 | + </modules> | ||
| 407 | 410 | <build> | |
| 408 | 411 | <plugins> | |
| 409 | 412 | <plugin> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,6 +52,7 @@ The project is organized into these modules: | |||
| 52 | 52 | | **gwt** | GWT compilation target support | | |
| 53 | 53 | | **j2cl** | J2CL compilation target support | | |
| 54 | 54 | | **showcase** | Interactive demo website (activated via `-P showcase`) | | |
| 55 | + | **snippet-tests** | Build-time validation of inline JavaDoc code snippets (activated via `-P check`, not deployed) | | ||
| 55 | 56 | | **apidoc** | API documentation aggregation (activated via `-P apidoc`) | | |
| 56 | 57 | ||
| 57 | 58 | The BOM lives in a separate Maven reactor and must be installed before building the main project. All build scripts and CI workflows handle this automatically. | |
@@ -63,7 +64,7 @@ The BOM lives in a separate Maven reactor and must be installed before building | |||
| 63 | 64 | | Profile | Activation | Purpose | | |
| 64 | 65 | |---------|-----------|---------| | |
| 65 | 66 | | `format` | `-P format` | Auto-format sources: editorconfig, import sorting, license headers | | |
| 66 | - | `check` | `-P check` | Validate sources: enforcer, checkstyle, editorconfig, import sorting, license headers | | ||
| 67 | + | `check` | `-P check` | Validate sources: enforcer, checkstyle, editorconfig, import sorting, license headers, snippet validation | | ||
| 67 | 68 | | `showcase` | `-P showcase` | Include the showcase module in the build | | |
| 68 | 69 | | `quick-build` | `-Dquickly` | Skip tests, javadoc, and integration tests | | |
| 69 | 70 | | `skip-j2cl` | `-DskipJ2CL` | Disable J2CL compilation (showcase only) | | |
@@ -115,7 +116,7 @@ mvn clean package -P showcase,prod | |||
| 115 | 116 | | Script | Purpose | | |
| 116 | 117 | |--------|---------| | |
| 117 | 118 | | `format.sh` | Shortcut for `mvn process-sources -P format,showcase` | | |
| 118 | - | `check.sh` | Shortcut for `mvn process-sources -P check,showcase` | | ||
| 119 | + | `check.sh` | Shortcut for `mvn test -P check,showcase` | | ||
| 119 | 120 | | `release.sh` | Orchestrate a release (see [Releasing](/releasing)) | | |
| 120 | 121 | | `unrelease.sh` | Roll back a failed release (see [Releasing](/releasing)) | | |
| 121 | 122 | | `versionBump.sh` | Bump version across all POMs and NPM packages | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,102 @@ | |||
| 1 | + <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | + <!-- | ||
| 3 | + | ||
| 4 | + Copyright 2023 Red Hat | ||
| 5 | + | ||
| 6 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 7 | + you may not use this file except in compliance with the License. | ||
| 8 | + You may obtain a copy of the License at | ||
| 9 | + | ||
| 10 | + https://www.apache.org/licenses/LICENSE-2.0 | ||
| 11 | + | ||
| 12 | + Unless required by applicable law or agreed to in writing, software | ||
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 15 | + See the License for the specific language governing permissions and | ||
| 16 | + limitations under the License. | ||
| 17 | + | ||
| 18 | + --> | ||
| 19 | + <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 20 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 21 | + <modelVersion>4.0.0</modelVersion> | ||
| 22 | + | ||
| 23 | + <parent> | ||
| 24 | + <groupId>org.patternfly</groupId> | ||
| 25 | + <artifactId>patternfly-java-code-parent</artifactId> | ||
| 26 | + <version>0.9.1-SNAPSHOT</version> | ||
| 27 | + <relativePath>../code-parent/pom.xml</relativePath> | ||
| 28 | + </parent> | ||
| 29 | + | ||
| 30 | + <artifactId>patternfly-java-snippet-tests</artifactId> | ||
| 31 | + <packaging>jar</packaging> | ||
| 32 | + <name>PatternFly Java Snippet Tests</name> | ||
| 33 | + <description>Build-time validation of inline JavaDoc code snippets. Not deployed.</description> | ||
| 34 | + | ||
| 35 | + <dependencies> | ||
| 36 | + <dependency> | ||
| 37 | + <groupId>${project.groupId}</groupId> | ||
| 38 | + <artifactId>patternfly-java-core</artifactId> | ||
| 39 | + </dependency> | ||
| 40 | + <dependency> | ||
| 41 | + <groupId>${project.groupId}</groupId> | ||
| 42 | + <artifactId>patternfly-java-components</artifactId> | ||
| 43 | + </dependency> | ||
| 44 | + <dependency> | ||
| 45 | + <groupId>${project.groupId}</groupId> | ||
| 46 | + <artifactId>patternfly-java-layouts</artifactId> | ||
| 47 | + </dependency> | ||
| 48 | + <dependency> | ||
| 49 | + <groupId>${project.groupId}</groupId> | ||
| 50 | + <artifactId>patternfly-java-icons</artifactId> | ||
| 51 | + </dependency> | ||
| 52 | + <dependency> | ||
| 53 | + <groupId>${project.groupId}</groupId> | ||
| 54 | + <artifactId>patternfly-java-tokens</artifactId> | ||
| 55 | + </dependency> | ||
| 56 | + <dependency> | ||
| 57 | + <groupId>${project.groupId}</groupId> | ||
| 58 | + <artifactId>patternfly-java-charts</artifactId> | ||
| 59 | + </dependency> | ||
| 60 | + <dependency> | ||
| 61 | + <groupId>${project.groupId}</groupId> | ||
| 62 | + <artifactId>patternfly-java-codeeditor</artifactId> | ||
| 63 | + </dependency> | ||
| 64 | + <dependency> | ||
| 65 | + <groupId>${project.groupId}</groupId> | ||
| 66 | + <artifactId>patternfly-java-finder</artifactId> | ||
| 67 | + </dependency> | ||
| 68 | + <dependency> | ||
| 69 | + <groupId>org.junit.jupiter</groupId> | ||
| 70 | + <artifactId>junit-jupiter</artifactId> | ||
| 71 | + <scope>test</scope> | ||
| 72 | + </dependency> | ||
| 73 | + </dependencies> | ||
| 74 | + | ||
| 75 | + <build> | ||
| 76 | + <plugins> | ||
| 77 | + <plugin> | ||
| 78 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 79 | + <artifactId>maven-surefire-plugin</artifactId> | ||
| 80 | + <configuration> | ||
| 81 | + <systemPropertyVariables> | ||
| 82 | + <project.root>${project.basedir}/..</project.root> | ||
| 83 | + </systemPropertyVariables> | ||
| 84 | + </configuration> | ||
| 85 | + </plugin> | ||
| 86 | + <plugin> | ||
| 87 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 88 | + <artifactId>maven-install-plugin</artifactId> | ||
| 89 | + <configuration> | ||
| 90 | + <skip>true</skip> | ||
| 91 | + </configuration> | ||
| 92 | + </plugin> | ||
| 93 | + <plugin> | ||
| 94 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 95 | + <artifactId>maven-deploy-plugin</artifactId> | ||
| 96 | + <configuration> | ||
| 97 | + <skip>true</skip> | ||
| 98 | + </configuration> | ||
| 99 | + </plugin> | ||
| 100 | + </plugins> | ||
| 101 | + </build> | ||
| 102 | + </project> | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments