链接 Maven Flyway 命令
如何使用 Maven 将 Flyway 命令链接成单个命令?
例如,我想运行mvninitializeflyway:clean
,然后运行mvninitializecompileflyway:migrate
。但是,mvninitializeflyway:cleancompileflyway:migrate
失败。
谢谢!
How can Flyway commands be chained into a single command using Maven?
For example, I want to run mvn initialize flyway:clean
followed by mvn initialize compile flyway:migrate
. However, mvn initialize flyway:clean compile flyway:migrate
fails.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我刚刚检查
了 Maven 2.2.1 和 Maven 3.0.3,它每次都有效。
你能仔细检查一下吗?如果您认为确实发现了问题,请在问题跟踪器 通过必要的步骤来重现它,我会尽力尽快修复它。
I just checked
with both Maven 2.2.1 and Maven 3.0.3 and it works every time.
Could you double check this? In case you think you really found a problem, please file an issue in the Issue Tracker with the necessary steps to reproduce it and I'll do my best to fix it asap.
这将使您能够链接 Maven 步骤,只需在其中添加您想要的目标
您还需要在 settings.xml 中添加以下内容
That will give you the ability to chain maven steps, just add the goals you want in there
You will also need the following in your settings.xml
如果我理解文档正确,您必须配置 maven-flyway 插件来完成工作并将其绑定到 Maven 的正确阶段,而不是您可以使用默认的 Maven 调用,例如 mvn clean package 或 mvn clean verify。
If i understand the docs correct you have to configure the maven-flyway plugin to do the work and bound it to the correct phases of maven than you can use the default maven calls like mvn clean package or mvn clean verify.
您可以使用 配置文件 将“命令”捆绑在一起。完成后你只需调用:
You can use profiles in order to bundle "commands" together. Once it's done you just call: