[英]Libraries not included in javaFX jar
I have built a javaFX application using Maven.The problem is that the javaFX jar file generated from maven, doesn't contain dependencies included. 我已经使用Maven构建了一个javaFX应用程序。问题是从maven生成的javaFX jar文件不包含所包含的依赖项。
I have included the javaFx dependency this way : 我已经通过这种方式包含了javaFx依赖项:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>javafx</artifactId>
<version>8.0.151</version>
<scope>system</scope>
<systemPath>C:\Program Files\Java\jdk1.8.0_151\jre\lib\ext\jfxrt.jar</systemPath>
</dependency>
I have also included the javaFx plugin : 我还包括了javaFx插件:
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.plugin.version}</version>
<configuration>
<vendor>Vendor</vendor>
<mainClass>org.bsh.generator.App</mainClass>
<jarFileName>CSVGenerator</jarFileName>
</configuration>
<executions>
<execution>
<id>create-jfxjar</id>
<phase>package</phase>
<goals>
<goal>build-jar</goal>
</goals>
</execution>
</executions>
</plugin>
When I build the jar using goal "build-jar", the jar generated doesn't include other dependencies. 当我使用目标“ build-jar”构建jar时,生成的jar不包含其他依赖项。 Any help please?
有什么帮助吗?
Dependencies scoped as system
are not respected, this is intentional. 不尊重范围为
system
依赖项,这是有意的。 Only provided
and runtime
scoped dependencies/libraries are respected by the plugin. 插件仅遵守
provided
和runtime
范围内的依赖项/库。
Disclaimer: I'm the maintainer of the javafx-maven-plugin. 免责声明:我是javafx-maven-plugin的维护者。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.