Skip to content

Commit 5431e71

Browse files
Copilotbrunoborges
andauthored
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>
1 parent 4baa9b4 commit 5431e71

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

docs/advanced-usage.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- [GraalVM](#GraalVM)
1313
- [JetBrains](#JetBrains)
1414
- [Installing custom Java package type](#Installing-custom-Java-package-type)
15+
- [JavaFX Maven project](#JavaFX-Maven-project)
1516
- [Installing custom Java architecture](#Installing-custom-Java-architecture)
1617
- [Installing custom Java distribution from local file](#Installing-Java-from-local-file)
1718
- [Testing against different Java distributions](#Testing-against-different-Java-distributions)
@@ -228,6 +229,30 @@ steps:
228229
- run: java --version
229230
```
230231

232+
### JavaFX Maven project
233+
234+
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.
235+
236+
```yaml
237+
steps:
238+
- uses: actions/checkout@v6
239+
- uses: actions/setup-java@v5
240+
with:
241+
distribution: 'zulu'
242+
java-version: '21'
243+
java-package: jdk+fx
244+
cache: maven
245+
- name: Build with Maven
246+
run: mvn --no-transfer-progress compile
247+
```
248+
249+
To run the JavaFX application in CI:
250+
251+
```yaml
252+
- name: Run with Maven
253+
run: mvn --no-transfer-progress javafx:run
254+
```
255+
231256
## Installing custom Java architecture
232257

233258
```yaml

0 commit comments

Comments
 (0)