[英]Eclipse -> Run as -> Run on server - How to get it to work with JBoss?
I use Eclipse Juno and I've made 2 projects: 我使用Eclipse Juno,我做了2个项目:
EAR Project -> Export -> Java EE -> EAR file
WEB -> WAR file
in the export
navigation menu. export
导航菜单中选择了WEB -> WAR file
。 After the WAR is deployed everything works fine. Now the reason I do the whole "Export" thing is because the Run as -> Run on server
does not build and deploy my projects. 现在我做整个“导出”事情的原因是因为
Run as -> Run on server
上Run as -> Run on server
不会构建和部署我的项目。 I thought that is its primary goal. 我认为这是它的首要目标。 Am I wrong?
我错了吗? Is there a way to make this command work as I expected it to?
有没有办法让这个命令像我预期的那样工作? I think it worked this way with Tomcat and web projects...
我认为它与Tomcat和Web项目一起工作......
I know this could be easily done by build script but that is not my point! 我知道这可以通过构建脚本轻松完成,但这不是我的观点!
Thanks in advance for your help and suggestions. 在此先感谢您的帮助和建议。
First of all, check if you have JBoss Tools installed in your Eclipse IDE. 首先,检查Eclipse IDE中是否安装了JBoss Tools。 You can find them here .
你可以在这里找到它们。
By default JBoss AS Adapter uses .metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss-AS-5.1.0.GA/deploy folder to deploy your project and then register this temp folder in JBoss. 默认情况下,JBoss AS Adapter使用.metadata / .plugins / org.jboss.ide.eclipse.as.core / JBoss-AS-5.1.0.GA / deploy文件夹来部署项目,然后在JBoss中注册此临时文件夹。 In other words, if you are starting JBoss AS from Eclipse, you have to deploy your project to this directory.
换句话说,如果从Eclipse启动JBoss AS,则必须将项目部署到此目录。
You can try this (taken from JBoss community site ), helped me too: 您可以尝试这个(取自JBoss社区网站 ),也帮助了我:
Server configuration (in Servers view in your Eclipse IDE) 服务器配置(在Eclipse IDE的Servers视图中)
Deployment > "Use the JBoss Deploy folder" 部署>“使用JBoss Deploy文件夹”
Save Server configuration 保存服务器配置
Select your project on server and make a "Ful Publish" using project context menu 在服务器上选择您的项目,并使用项目上下文菜单进行“Ful Publish”
Start server 启动服务器
If you have everything configured correctly, the "add and remove" method from the previous answer should be working, too... 如果您已正确配置所有内容,那么上一个答案中的“添加和删除”方法也应该正常工作......
Let me know, if you got it working. 如果你让它工作,请告诉我。
I would recommend another approach. 我会推荐另一种方法。 First
Build
both projects in eclipse (right click on project -> Build
), then left click on your server -> Add and Remove ...
and check if both projects are added. 首先在eclipse中
Build
两个项目(右键单击项目 - > Build
),然后左键单击您的服务器 - > Add and Remove ...
并检查是否添加了两个项目。 Now you can use Run on server
or Publish
in server context menu. 现在,您可以使用
Run on server
或Publish
in server context菜单。
If there will be still no progress, try to undeploy your projects from JBoss which were Exported to autodeploy directory. 如果仍然没有进展,请尝试从JBoss取消部署已导出到autodeploy目录的项目。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.