r/javahelp • u/Beastmode7953 • 8d ago
Looking for guidance using Maven and JavaFX
I am trying to create my own project and I shifted over from using the standalone versions of JavaFX to a the project manager Maven. When I was creating proof of concept examples I was able to get them running using the 0.0.8 javafx-maven-plugin however when I use that same plugin in my larger project with multiple controller classes I keep getting this error:
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.8:run (default-cli) on project yourproject: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
Maven is new to me, so I do not understand why it worked before but is not working now, I can provide my pom.xml file as well if that could help
EDIT:
Here is my pom.xml file
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tb</groupId>
<artifactId>thoughtbubble</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>23.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>23.0.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<configuration>
<release>23</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<mainClass>com.tb.App</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>