title: Gluon client-maven-plugin produces an exe file that does not run
body: <p>I'm currently trying to use Gluon's client-maven-plugin to build a native JavaFX app on Windows.</p>
  
  <p>When I run mvn clean client:build, the build finishes successfully and produces a ~75MB exe file. However, when I try to run the app using mvn client:run, nothing happens and the terminal immediately tells me that my build was successful. I am not sure what's going on.</p>
  
  <p>For reference, this is my pom.xml file:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;stl&lt;/groupId&gt;
      &lt;artifactId&gt;threebodysimulation&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;threebodysimulation&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.release&gt;11&lt;/maven.compiler.release&gt;
          &lt;javafx.version&gt;14.0.1&lt;/javafx.version&gt;
          &lt;mainClassName&gt;stl.threebodysimulation.Launcher&lt;/mainClassName&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-controls&lt;/artifactId&gt;
              &lt;version&gt;${javafx.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
              &lt;artifactId&gt;javafx-fxml&lt;/artifactId&gt;
              &lt;version&gt;${javafx.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-math3&lt;/artifactId&gt;
              &lt;version&gt;3.2&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;oss-sonatype-snapshots&lt;/id&gt;
              &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.8.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;release&gt;${maven.compiler.release}&lt;/release&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.openjfx&lt;/groupId&gt;
                  &lt;artifactId&gt;javafx-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.0.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;mainClass&gt;stl.threebodysimulation.Launcher&lt;/mainClass&gt;
                      &lt;launcher&gt;launcher&lt;/launcher&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.gluonhq&lt;/groupId&gt;
                  &lt;artifactId&gt;client-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;0.1.27-SNAPSHOT&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;reflectionList&gt;
                          &lt;list&gt;javafx.application.Platform&lt;/list&gt;
                          &lt;list&gt;javafx.concurrent.Task&lt;/list&gt;
                          &lt;list&gt;javafx.fxml.FXML&lt;/list&gt;
                          &lt;list&gt;javafx.fxml.FXMLLoader&lt;/list&gt;
                          &lt;list&gt;javafx.fxml.Initializable&lt;/list&gt;
                          &lt;list&gt;javafx.geometry.Insets&lt;/list&gt;
                          &lt;list&gt;javafx.scene.Parent&lt;/list&gt;
                          &lt;list&gt;javafx.scene.Scene&lt;/list&gt;
                          &lt;list&gt;javafx.scene.image.Image&lt;/list&gt;
                          &lt;list&gt;javafx.stage.Stage&lt;/list&gt;
                          &lt;list&gt;javafx.stage.Modality&lt;/list&gt;
                          &lt;list&gt;javafx.stage.Window&lt;/list&gt;
                          &lt;list&gt;javafx.scene.image.Image&lt;/list&gt;
                          &lt;list&gt;javafx.scene.image.ImageView&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.BorderPane&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.HBox&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.StackPane&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.VBox&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.ColumnConstraints&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.GridPane&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.RowConstraints&lt;/list&gt;
                          &lt;list&gt;javafx.scene.layout.AnchorPane&lt;/list&gt;
                          &lt;list&gt;javafx.scene.canvas.Canvas&lt;/list&gt;
                          &lt;list&gt;javafx.scene.canvas.GraphicsContext&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.Tab&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.TabPane&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.Button&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.Label&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.CheckBox&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.ChoiceBox&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.ColorPicker&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.TextField&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.TextFormatter&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.Tooltip&lt;/list&gt;
                          &lt;list&gt;javafx.scene.control.Separator&lt;/list&gt;
                          &lt;list&gt;javafx.scene.text.Font&lt;/list&gt;
                          &lt;list&gt;javafx.scene.paint.Color&lt;/list&gt;
                          &lt;list&gt;javafx.scene.shape.Circle&lt;/list&gt;
                          &lt;list&gt;javafx.application.Application&lt;/list&gt;
                          &lt;list&gt;javafx.util.Duration&lt;/list&gt;
                          &lt;list&gt;org.apache.commons.math3.exception.NumberIsTooLargeException&lt;/list&gt;
                          &lt;list&gt;org.apache.commons.math3.exception.NumberIsTooSmallException&lt;/list&gt;
                          &lt;list&gt;org.apache.commons.math3.ode.nonstiff.DormandPrince853Integrator&lt;/list&gt;
                          &lt;list&gt;org.apache.commons.math3.ode.FirstOrderDifferentialEquations&lt;/list&gt;
                          &lt;list&gt;java.util.Arrays&lt;/list&gt;
                          &lt;list&gt;java.util.HashMap&lt;/list&gt;
                          &lt;list&gt;java.text.DecimalFormat&lt;/list&gt;
                          &lt;list&gt;java.net.URL&lt;/list&gt;
                          &lt;list&gt;java.util.ResourceBundle&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.CanvasPanelFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.CanvasWrapper&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.ErrorMessage&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.InfoFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.InfoPanelFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.Launcher&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.Listener&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.MainApp&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.NumberFormat&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.ParameterFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.Particle&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.ParticleDiffEq&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.PopupWindowFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.SceneFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.SettingsPanelFXMLController&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.SimulationSettings&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.SimulationState&lt;/list&gt;
                          &lt;list&gt;stl.threebodysimulation.TextFieldWrapper&lt;/list&gt;
                      &lt;/reflectionList&gt;
                      &lt;mainClass&gt;stl.threebodysimulation.Launcher&lt;/mainClass&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I originally thought it might be a problem with the reflection list, so I added every class I had (and also every import I used in both java and FXML) to the list. It doesn't seem to help. The program runs normally when I use mvn compiler:compile resources:resources javafx:run. </p>
  
  <p>Does anyone have any idea on where the problem might be? Thanks!</p>
  
  <p>EDIT:</p>
  
  <p>The Maven file references a "Launcher" class which looks like this:</p>
  
  <pre><code>package stl.threebodysimulation;
  
  import javafx.application.Application;
  
  /**
   * The class whose main method is called when the application is run.
   */
  public class Launcher {
      /**
       * Runs the application.
       * @param args Terminal arguments.
       */
      public static void main(String[] args) {
          Application.launch(MainApp.class, args);
      }
  }
  </code></pre>
  
  <p>This calls a MainApp class that looks like this:</p>
  
  <pre><code>package stl.threebodysimulation;
  
  import javafx.application.Application;
  import javafx.fxml.FXMLLoader;
  import javafx.scene.Parent;
  import javafx.scene.Scene;
  import javafx.scene.image.Image;
  import javafx.stage.Stage;
  
  
  /**
   * This class launches the UI of the app.
   */
  public class MainApp extends Application {
      /**
       * @param stage The window that the app will be run in. Supplied by the Application parent class.
       * @throws Exception An exception that occurs if the layout files are not found. Should never occur.
       */
      @Override
      public void start(Stage stage) throws Exception {
          // Set up the scene.fxml files and the CSS files. The inputs and outputs exist to implement the parent class Application.
          FXMLLoader appLoader = new FXMLLoader(getClass().getResource("/scene.fxml"));
          Parent root = appLoader.load();
          Scene scene = new Scene(root, 1200, 900);
  
          // Load in CSS
          scene.getStylesheets().add(getClass().getResource("/bootstrap3.css").toExternalForm());
  
          // We don't want the window to be resizable, to save us the UI headache.
          stage.setResizable(false);
  
          // Icon of app
          stage.getIcons().add(new Image("/appIcon.png"));
  
          // Title of app
          stage.setTitle("Three-Body Simulation");
  
          // Stage the UI.
          stage.setScene(scene);
          stage.show();
      }
  
  }
  </code></pre>
  
  <p>EDIT 2:</p>
  
  <p>The logs for the error can be seen here:</p>
  
  <pre><code>[Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] Exception in Application start method
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at java.lang.Thread.run(Thread.java:834)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:517)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] Caused by: javafx.fxml.LoadException: 
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] stl/threebodysimulation/settingsPanel.fxml:14
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] stl/threebodysimulation/scene.fxml:14
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] 
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2629)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2607)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1154)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2726)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2556)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2470)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2439)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at stl.threebodysimulation.MainApp.start(MainApp.java:23)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at java.security.AccessController.doPrivileged(AccessController.java:101)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_Runnable_2_0002erun_00028_00029V(JNIJavaCallWrappers.java:0)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  ... 3 more
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB] Caused by: java.io.IOException: Including "resource:stl/threebodysimulation/settingsPanel.fxml" in "resource:stl/threebodysimulation/settingsPanel.fxml" created cyclic reference.
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:1146)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:754)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2726)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2556)
  [Wed Jun 03 18:58:32 EDT 2020][FINE] [SUB]  ... 20 more
  [Wed Jun 03 18:58:32 EDT 2020][FINE] Result for run until end: 0
  </code></pre>
  
  <p>A similar error can be found <a href="https://github.com/gluonhq/client-gradle-plugin/issues/13" rel="nofollow noreferrer">here.</a></p>
  
  <p>Line 14 of scene.fxml looks like this:</p>
  
  <pre><code>&lt;fx:include fx:id="settingsPanel" source="settingsPanel.fxml" /&gt;
  </code></pre>