mirror of
https://github.com/actions/setup-java.git
synced 2026-06-23 01:38:20 +01:00
docs: add JavaFX Maven project configuration instructions (#1044)
* Initial plan * docs: add JavaFX Maven project configuration instructions --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bruno Borges <brborges@microsoft.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
- [GraalVM](#GraalVM)
|
- [GraalVM](#GraalVM)
|
||||||
- [JetBrains](#JetBrains)
|
- [JetBrains](#JetBrains)
|
||||||
- [Installing custom Java package type](#Installing-custom-Java-package-type)
|
- [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 architecture](#Installing-custom-Java-architecture)
|
||||||
- [Installing custom Java distribution from local file](#Installing-Java-from-local-file)
|
- [Installing custom Java distribution from local file](#Installing-Java-from-local-file)
|
||||||
- [Testing against different Java distributions](#Testing-against-different-Java-distributions)
|
- [Testing against different Java distributions](#Testing-against-different-Java-distributions)
|
||||||
@@ -228,6 +229,30 @@ steps:
|
|||||||
- run: java --version
|
- 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
|
## Installing custom Java architecture
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user