如何配置从 Eclipse 到 Wildfly 的部署

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22285996/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:34:15  来源:igfitidea点击:

How to configure deployment from Eclipse to Wildfly

eclipsemavendeploymentwildfly

提问by karpaczio

When I deploy app using jboss-as-maven-plugin

当我使用jboss-as-maven-plugin部署应用程序时

mvn clean jboss-as:deploy

application works. When I try to deploy from Eclipse using e.g. "Full publish", it doesn't.

应用程序工作。当我尝试使用例如“完全发布”从 Eclipse 进行部署时,它没有。

I've compared versions of application being deployed and seems that "Full publish" simply copied what has been specified in Properties > Deployment Assembly.

我比较了正在部署的应用程序的版本,似乎“完全发布”只是复制了在Properties > Deployment Assembly 中指定的内容。

Is it possible to use this plugin during "Full publish" ? I want to make use of hot deploy feature for jsp, but without properly configured automatic deployment from Eclipse I'm rather blocked.

是否可以在“完全发布”期间使用此插件?我想为 jsp 使用热部署功能,但没有从 Eclipse 正确配置自动部署,我很受阻。

regards

问候

Lukas

卢卡斯

Wildfly 8.0.0.CR1 
Eclipse Keppler SR1 
org.jboss.as.plugins:jboss-as-maven-plugin:7.2.Final

回答by klind

I just updated to wildfly, and I had to use this to deploy to jboss.

我刚刚更新到wildfly,我不得不使用它来部署到jboss。

https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html

https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html

回答by zlinks

I am as troubled as you are with this.

我和你一样烦恼。

After searching a bit more I have found these two suggestions in SO: A: Eclipse Kepler and JBoss Wildfly hot deploymentand B: Hot deploy on JBoss - how do I make JBoss “see” the change?

在搜索更多之后,我在 SO 中找到了以下两个建议:A:Eclipse Kepler 和 JBoss Wildfly 热部署和 B:JBoss 上的热部署 - 如何让 JBoss“看到”更改?

In both cases I did a mvn installin order to create warfile and then deployed it by right clicking the server and using add-remove. Now every time I changed something and then pressed save the console output would change informing me that 20:02:45,086 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "web.war" with deployment "web.war". If I pointed my browser to the URL of my project the changes would indeed be there.

在这两种情况下,我都做了一个mvn install以创建war文件,然后通过右键单击服务器并使用添加删除来部署它。现在,每次我更改某些内容然后按下保存时,控制台输出都会更改,通知我20:02:45,086 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "web.war" with deployment "web.war". 如果我将浏览器指向我的项目的 URL,更改确实会在那里。

NOTE: Be careful when undeploying in the second case. I had it undeployed from eclipse but when going at: http://localhost:9990/console/App.html#deploymentsI could still see the war so I also had to remove it by pressing the remove button from the Management Console.

注意:在第二种情况下取​​消部署时要小心。我已经从 Eclipse 中取消了它的部署,但是在进行时:http://localhost:9990/console/App.html#deployments我仍然可以看到War,所以我还必须通过按管理控制台中的删除按钮来删除它。

I hope this helps but I am not sure that this kind of functionality is hot deployement though.

我希望这会有所帮助,但我不确定这种功能是否是热部署。