有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

JavaFXMaven插件:com。zenjava jfx:jar是否包含所有依赖项?

有没有办法通过运行javafxmaven插件的jfx:jar目标将所有依赖项包含在生成的jar中

目前,所有项目依赖项都存储在一个名为“lib”的文件夹中。 enter image description here

我正在寻找一种生成javafx可执行jar的方法,就像eclipse项目>;出口>;Runnable Jar设置有以下选项: enter image description here

其他一些信息: 目前,如果我使用jfx:jar,生成的jar大约为150kb,除非存在依赖项lib,否则不会运行

但是,如果我使用上面显示的eclipse runnable jar导出选项,生成的jar大约为40000kB,可以自己运行

我的pom:

    <properties>
        <jfx.output.dir>${project.build.directory}/application/</jfx.output.dir>
    </properties>
    .
    .
    .
            <plugins>
                <plugin>
                    <groupId>com.zenjava</groupId>
                    <artifactId>javafx-maven-plugin</artifactId>
                    <version>8.7.0</version>
                    <configuration>
                        <mainClass>my.main.class.Main</mainClass>
                        <jfxAppOutputDir>${jfx.output.dir}</jfxAppOutputDir>
                        <allPermissions>true</allPermissions>
                    </configuration>
                </plugin>
            </plugins>

共 (0) 个答案