Unverified Commit 5431e71f authored by Copilot's avatar Copilot Committed by GitHub
Browse files

docs: add JavaFX Maven project configuration instructions (#1044)

* Initial plan

* docs: add JavaFX Maven project configuration instructions

---------

Co-authored-by: default avatarcopilot-swe-agent[bot] <[email protected]>
Co-authored-by: default avatarBruno Borges <[email protected]>
parent 4baa9b45
Loading
Loading
Loading
Loading
+25
Changes for docs/advanced-usage.md: 25 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  - [GraalVM](#GraalVM)
  - [JetBrains](#JetBrains)
- [Installing custom Java package type](#Installing-custom-Java-package-type)
  - [JavaFX Maven project](#JavaFX-Maven-project)
- [Installing custom Java architecture](#Installing-custom-Java-architecture)
- [Installing custom Java distribution from local file](#Installing-Java-from-local-file)
- [Testing against different Java distributions](#Testing-against-different-Java-distributions)
@@ -228,6 +229,30 @@ steps:
- run: java --version
```

### JavaFX Maven project

For JavaFX projects that use Maven, use `jdk+fx` (or `jre+fx`) as the `java-package` value together with a distribution that supports it (e.g. `zulu` or `liberica`). Then include the [`javafx-maven-plugin`](https://openjfx.io/openjfx-docs/#maven) in your `pom.xml` as described in the [Getting Started with JavaFX](https://openjfx.io/openjfx-docs/#maven) guide.

```yaml
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
  with:
    distribution: 'zulu'
    java-version: '21'
    java-package: jdk+fx
    cache: maven
- name: Build with Maven
  run: mvn --no-transfer-progress compile
```

To run the JavaFX application in CI:

```yaml
- name: Run with Maven
  run: mvn --no-transfer-progress javafx:run
```

## Installing custom Java architecture

```yaml