如何使用IntelliJ IDEA的standalone-full.xml运行WildFly?

时间:2014-09-15 13:57:59

标签: intellij-idea wildfly

我试图从Intellij IDEA运行Wildfly 8.0。通过命令行启动WildFly时,我可以使用-c standalone-full.xml参数来使用standalone-full.xml配置文件。从Intellij IDEA运行WildFly时如何指定?

8 个答案:

答案 0 :(得分:38)

在我看来,切换-c standalone-full.xml不是VM Option所以我会发布一些不同的解决方案: 在选项卡Startup/Connection中的服务器的运行/调试配置中,您可以设置Startup script:在行尾有复选框Use default。请取消选中并粘贴到输入-c standalone-full.xml

的末尾

答案 1 :(得分:25)

-Djboss.server.default.config=standalone-full.xml添加到VM_OPTIONS相当于从shell运行standalone -c standalone-full.xml

答案 2 :(得分:3)

Mike Holdsworth所说-Djboss.server.default.config=standalone-full.xml完美无缺。 但是与-c standalone-full.xml方法相比还有另一个优势。

重命名standalone.xml文件以创建多个环境的自定义配置文件时。与env1.xmlenv2.xml等相同 如果您使用-c env1.xml,Intellij将为您提供以下消息:

  

错误:找不到HTTP管理端口配置。

所以你必须把一个基本的standalone.xml放在启动时,用-c选项给你。{/ p>

-Djboss.server.default.config=env1.xml会阻止它。

答案 3 :(得分:2)

注意" Run"的不同启动脚本和"调试"在Intellij IDEA。如果你没有取消选中"使用默认"在他们两个中,你最终可以得到两个不同的配置文件"运行"和"调试"。很容易忘记和讨厌弄清楚。

答案 4 :(得分:1)

我是一个跨平台团队,我们分享我们的运行配置。修改启动脚本可能会导致问题(其他队友的路径和启动脚本不同),所以我的解决方案是:

  • 备份standalone.xml
  • 将standalone-full.xml重命名为standalone.xml

这并没有直接回答OP的问题,但可能对大家有所帮助。

答案 5 :(得分:1)

如果你想默认运行它没有传递任何命令行参数而不是go 独立。(bat | sh)

附加到 SERVER_OPTS 变量: - server-config = standalone-full.xml

至少现在你可以从任何地方(ide,服务,命令行)以完整模式运行它

答案 6 :(得分:0)

在服务器的运行/调试配置中,您可以设置VM options。你可以把你的开关放在那里。你可能会遇到问题,因为jboss会识别文件的正确路径,所以你可能需要先玩一下它才能适合你。

答案 7 :(得分:-1)

Run -> Edit configurations -> Click '+' in the top left corner -> JBoss Server -> Local

在那里,您可以配置JBoss实例并设置VM选项等。

相关问题