简体   繁体   English

摇篮; 如何启动/停止JBoss AS 7.1.1

[英]Gradle; How to start/stop JBoss AS 7.1.1

I am new to Gradle and started learning the same. 我是Gradle的新手,并且开始学习相同的东西。 I am able to deploy the web application into jboss through Gradle. 我可以通过Gradle将Web应用程序部署到jboss中。 I need to stop and start the server after the deployment. 部署后,我需要停止并启动服务器。 Please let me know how to invoke the script from Gradle. 请让我知道如何从Gradle调用脚本。

You can write a custom exec task to start and stop jboss. 您可以编写一个自定义exec任务来启动和停止jboss。 You can then either define dependsOn accordingly or call them in order when you invoke gradle. 然后,您可以相应地定义dependsOn,也可以在调用gradle时按顺序调用它们。

task startJboss(type:Exec) {
    workingDir = "" //set the working dir
    commandLine = "" //set the command to execute to start jboss.
}

There are also a few gradle jboss plugins you can look at: 您还可以查看一些gradle jboss插件:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM