Last active
February 20, 2019 02:10
-
-
Save leif81/605e205c9d8b25ba109535c9ad00b661 to your computer and use it in GitHub Desktop.
How I got javafx 11 modules working with the exec:exec plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<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/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>foo</groupId> | |
<artifactId>bar</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.openjfx</groupId> | |
<artifactId>javafx-controls</artifactId> | |
<version>11.0.2</version> | |
</dependency> | |
<dependency> | |
<groupId>org.openjfx</groupId> | |
<artifactId>javafx-fxml</artifactId> | |
<version>11.0.2</version> | |
</dependency> | |
<dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.6.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>exec</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<executable>java</executable> | |
<arguments> | |
<argument>-classpath</argument> | |
<classpath/> | |
<argument>--module-path</argument> | |
<modulepath/> | |
<argument>--add-modules</argument> | |
<argument>javafx.controls,javafx.fxml</argument> | |
<!-- my project uses jinput which requires modifying the java.library.path to find the native libs which is why exec:exec was required over exec:java --> | |
<argument>-Djava.library.path=target/appassembler/lib</argument> | |
<argument>com.foo.BarMain</argument> | |
</arguments> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment