I am trying to build (have built) a JavaFX application using maven and IntelliJ. However when I try to run the maven javafx:jlink I keep getting an error saying Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.4:jlink (default-cli) on project TheHydrant: Execution default-cli of goal org.openjfx:javafx-maven-plugin:0.0.4:jlink failed: Cannot invoke "java.io.File.getAbsolutePath()" because "dir" is null
The code is all on github the link is: https://github.com/Binxlola/TheHydrant
Below is also my current pom.xml file and it's contents and a link to the structure of the project. When i grab files I don't use a full path but rather just the file name as all resources should be complied into the same directory as the classes that uses them. With the exception of some icons which I will grab using "/file.ext"
<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.TheHydrant</groupId>
<artifactId>TheHydrant</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.4.27.Final</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.4</version>
<configuration>
<stripDebug>true</stripDebug>
<compress>2</compress>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<launcher>TheHydrant</launcher>
<jlinkImageName>The-Hydrant</jlinkImageName>
<jlinkZipName>TheHydrant</jlinkZipName>
<mainClass>com.TheHydrant.App</mainClass>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.fxml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
</project>
PROJECT STRUCTURE
question from:
https://stackoverflow.com/questions/65883144/goal-org-openjfxjavafx-maven-plugin0-0-4jlink-failed-cannot-invoke-java-io 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…