New milestone for Gluon’s Maven and Gradle plugins


Gluon recently upgraded its client plugins to version 1.0. It marks a milestone in terms of the work Gluon has been doing to make Java(FX) available across platforms.

One of the major changes that went into this release has been the renaming of the plugins from “client” to “gluonfx”. The gluonfx plugins aim to be your single plugin of choice for developing Java client applications.

The Github repositories of the plugins have been renamed as well:

1. GluonFX Maven plugin
2. GluonFX Gradle plugin


GluonFX Maven plugin

v1.0 of the GluonFX Maven plugin has a few breaking changes, which include:

  • Prefix for all goals has been renamed from client:* to gluonfx:*. For example: to build a native image, use mvn gluonfx:build instead of mvn client:build
  • gluonfx:nativerun replaces client:run to execute native application
  • A new goal gluonfx:run can be used to run the application on JVM/hotspot. It simplifies resolution of Attach libraries for Desktop.

The following table lists the commands used in previous version vs v1.0 onward:

Task Previous Command Present Command
Run application on JVM/HotSpot mvn javafx:run mvn gluonfx:run
Run application to generate config files for the native image mvn client:runagent mvn gluonfx:runagent
Build a native image mvn client:build mvn gluonfx:build
Run the native image mvn client:run mvn gluonfx:nativerun

For more information, please check the documentation and release notes of GluonFX Maven plugin.

To use our latest Maven plugin, update `pom.xml` with:

<plugin>
    <groupId>com.gluonhq</groupId>
    <artifactId>gluonfx-maven-plugin</artifactId>
    <version>1.0.1</version>
</plugin>

We have updated Gluon samples with these changes and a quick view at our HelloFX sample can help developers easily migrate to v1.0.


GluonFX Gradle plugin

Gluon has also released version 1.0 for the Gradle plugin. Unlike their ancestors, plugins are now directly released to the Gluon plugin portal making it easier for developers to use them in their projects.

GluonFX Gradle plugin doesn’t have any breaking changes in their task names and the same tasks can still be used to build and run a native application. Nevertheless, there is a breaking change in how we configure the plugin. Instead of gluonClient{ }, we now use gluonfx{ }:

plugins {
    id "com.gluonhq.gluonfx-gradle-plugin" version "1.0.1"
}
...
gluonfx {
    target = "host"
    attachConfig {
        ...
    }
    ...
}

A new Gluon samples repository has been created with a few examples showcasing the usage of the plugin in project(s).


Hopefully, this blog post will help you migrate to the latest version of your favorite plugin. Please give the new releases a try and feel free to log issues in our Github repository, if any.

If you’re just getting started using Gluon, have a look at our documentation and samples.

At the time of writing this blog post, Gluon already has a bug fix release v1.0.1 for both Maven and Gradle plugins 🙂