openjfx / javafx-maven-plugin

Maven plugin to run JavaFX 11+ applications
Apache License 2.0
371 stars 59 forks source link

Plugin downloads wrong architecture for MacOS on M1 #141

Closed PorkLip closed 3 years ago

PorkLip commented 3 years ago

The plugin does not use the architecture of the OS when downloading dependencies. The Gradle plugin has the same problem #112.

Until it is fixed the javafxPlatform configuration property can be used to override the broken os / architecture logic in the Maven plugin

 <plugin>
    <groupId>org.openjfx</groupId>
    <artifactId>javafx-maven-plugin</artifactId>
    <version>0.0.7</version>
    <configuration>

        <mainClass>x.y.z.JavaFxClient</mainClass>

        <!-- Hardcoded path to correct Java -->
        <executable>/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java</executable>

        <!-- Use this to override the broken os / architecture logic -->
        <javafxPlatform>mac-aarch64</javafxPlatform>

    </configuration>
</plugin>
PorkLip commented 3 years ago

Using javafx:dorun instead of javafx:run also seems to work without any patches. So #140 will fix this issue