JavaFX Application with Maven in Eclipse

前端 未结 5 1550
逝去的感伤
逝去的感伤 2021-01-02 01:41

I want to ask if there is any method to add JavaFX into Maven Archetype list in Eclipse or any plugin to use Maven to build JavaFX Application.

5条回答
  •  情深已故
    2021-01-02 02:20

    There is the javafx-maven-plugin which is available for maven.

    When developing with Java 8 you just put that plugin as some build-plugin, without further dependencies.

    
        com.zenjava
        javafx-maven-plugin
        8.8.3
        
            your.main.class.which.extends.javafx.Application
        
    
    

    Calling mvn jfx:jar creates your javafx-application-jar inside target/jfx/app/yourapp-jfx.jar, or even creates native launcher (like EXE-file) when calling mvn jfx:native.

    Disclaimer: I'm the maintainer of the javafx-maven-plugin.

提交回复
热议问题