java - 如何使用插件编译带有 JVM 参数的 Maven JAR 文件?
问题描述
我正在寻找一个可以自行执行良好 JVM 参数的 Maven 插件。现在,我已经尝试使用maven-compiler-plugin
and the maven-surefire-plugin
(我的项目的 pom 在下面)。
我希望 jvm 执行的参数类型是这样的:
--module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls
为了启动 javafx 应用程序。
与pom.xml
插件测试。
<build>
<plugins>
//tests with the surefire plugin (without tests).
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skipTests>true</skipTests>
<argLine>--module-path="C:\Program Files\Java\javafx-sdk-11\lib" --add-modules=javafx.controls</argLine>
</configuration>
</plugin>
</plugins>
</build>
解决方案
推荐阅读
- amazon-web-services - 广告网络流量和 Lambda 调用不匹配
- c++ - SDL2 程序在最小化时会占用大量内存
- docker - 在没有编排器的情况下使用 docker 完成任务时生成一个工作容器并杀死它
- braintree - 3D Secure songbird js CSP 要求
- python - 在 Docker 构建期间导致问题的 python 版本
- android - 在方法中返回 JSONObject 响应
- javascript - 删除带有参数的函数内的事件处理程序
- php - Cloud Firestore 使用 REST API 添加多个文档 - PHP
- .net - Angular 连接到 ASP.NET API SignalR Hub 返回 404 Not Found (Identity Server 3)
- sql - 如何对 sql 连接进行聚合?