maven - 如何将其他插件与 JavaFX Maven 插件结合使用?
问题描述
我将 Git 提交 ID 插件与 JavaFX Maven 插件一起使用。不幸的是,Git 提交 ID 插件“修订”目标仅由 执行mvn compile
,而不是由执行,mvn javafx:compile
因此我需要同时运行两者才能成功运行我的程序。我怎样才能mvn javafx:compile
执行 Git 提交 ID 插件的“修订”目标,这样我就不需要双重编译?
相关 POM 部分
<build>
<sourceDirectory>[...]</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.3</version>
<configuration>
<mainClass>[...]</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
<format>properties</format>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
</plugins>
</build>
解决方案
推荐阅读
- jenkins - 在电子邮件中发送 Jenkins 错误日志(无法提取日志的错误部分)
- linux - 以具有 sudo 权限的普通用户身份运行命令
- javascript - 如何在jquery中从9天后的给定天数中获取下一个日期?
- laravel - 如何从我的本地计算机访问远程 Elasticsearch 服务器(在 Google Compute Engine 上)
- google-analytics - 谷歌实验数据差异
- c# - 如何在 EF core 2.1 中使用 FreeText
- php - 将表导出到 CSV 文件缺少列信息
- android - android上的旋转视频
- android - 谷歌地图:android.os.DeadObjectException - 崩溃应用程序
- sql-server - 特定节点及其标签的 SQL 解析 XML