简体   繁体   English

Google App Engine Java是否支持Eclipse中的热部署?

[英]Does Google App Engine Java support Hot Deployment in Eclipse?

It doesn't seem to do this by default, which is pretty shocking to me given all the other stuff they've set up to make development easy. 它默认情况下似乎没有这样做,这对我来说非常令人震惊,因为他们已经设置了所有其他的东西以使开发变得容易。 Is there a way to enable this? 有没有办法实现这个? If not, anybody know why it isn't supported? 如果没有,任何人都知道为什么不支持它?

There is JRebel that can help you with this http://englove.blogspot.com/2010/09/appengine-hot-deploy-on-mac.html JRebel可以帮助您解决这个问题http://englove.blogspot.com/2010/09/appengine-hot-deploy-on-mac.html

But using JRebel i had troubles with GWT in Development Mode. 但是使用JRebel我在开发模式下遇到了GWT问题。

BUt, there is a simplier way to do it. BUt,有一种简单的方法可以做到这一点。 You can have hot deploy of your server clases if you debug your application in Eclipse. 如果在Eclipse中调试应用程序,则可以热部署服务器代码。

Debug As -> Web Application 调试为 - > Web应用程序

That's all! 就这样! :) :)

This is an open feature request on the App Engine Issue Tracker. 这是App Engine问题跟踪器上的开放功能请求 You should vote on it there. 你应该在那里投票。

FWIW, it does work with JSP as expected (they get invalidated and recompiled when you update them). FWIW,它按预期与JSP一起工作(它们在更新时会失效并重新编译)。

I work with App Engine 1.9.2, and it is already working not only for JSPs, but Servlets and Java code as well. 我使用的是App Engine 1.9.2, 不仅适用于JSP,还适用于Servlet和Java代码。

If your project is Maven-based, and you start your server with mvn appengine:devserver , after modifying some code, all you need to do is 如果您的项目是基于Maven的,并且使用mvn appengine:devserver启动服务器,则在修改某些代码之后,您需要做的就是

mvn package

and refresh the page in your browser. 并在浏览器中刷新页面。

I realized that local server reloads when I modify and save the appengine-web.xml file, so i created a build.xml file with this instructions and runs from eclipse+ant , so I have a hot deploy 当我修改并保存appengine-web.xml文件时,我意识到本地服务器重新加载,所以我用这个指令创建了一个build.xml文件并从eclipse+ant运行,所以我有一个热部署

<?xml version="1.0"?>

<project default="main" basedir=".">
<property name="appengine" location="${basedir}/war/WEB-INF/appengine-web.xml" />


<target name="main">
    <echo message="REINICIANDO SERVIDOR LOCAL ${appengine}" />
    <touch file="${appengine}" />
</target>

</project>

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

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