Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在开发中,想要将您的战争部署到您的本地应用程序服务器是相当普遍的,无论它是否已经部署(即只需部署旧版本,如果它在那里)。
然而,在以下情况下,cargo 和 glassfish maven 插件都会失败:
作为开发人员,我不想选择其中一个。是否有一个命令可以使部署在两个用例中都成功?
cargo:redeploy现在可以在货物 1.1.3 中按预期工作(至少对于 glassfish)
cargo:redeploy
不是您问题的真正答案,但作为一种解决方法,您可以使用
mvn cargo:undeploy cargo:deploy
如果我没记错的话,如果未部署应用程序,则 cargo:undeploy 目标不会失败,并且 maven 将继续使用 cargo:deploy 目标。