【问题标题】:Re-run the application on file changes using exec-maven-plugin使用 exec-maven-plugin 在文件更改时重新运行应用程序
【发布时间】:2021-04-08 18:40:18
【问题描述】:

我有一个基于 maven 的应用程序,我使用 exec-maven-plugin 运行 mvn compile exec:java。如何配置它以便在检测到文件更改时重新启动应用程序?

【问题讨论】:

  • 热重载会帮助你吗?

标签: java maven exec-maven-plugin


【解决方案1】:

如果 maven-compiler-plugin:compile 编译更改的源,它会创建文件.../target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

您可以将您的exec-maven-plugin 放入Maven profile 并通过<file>/<exists> 激活它。

【讨论】:

    猜你喜欢
    • 2012-11-08
    • 2016-01-31
    • 2018-03-20
    • 2017-08-02
    • 1970-01-01
    • 2016-10-17
    • 1970-01-01
    • 2011-07-03
    • 2020-10-04
    相关资源
    最近更新 更多