Java maven开发慢 [英] Java maven development slow

查看:127
本文介绍了Java maven开发慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个通过maven构建的战争/ java网站。

I am developing a war/java website that is built via maven.

目前,我必须进行更改...告诉maven来构建它们...然后部署到Tomcat。这是围绕 40秒。所以每一个变化,我都要等待> = 40秒才能看到这个变化。

Currently, I have to make changes... tell maven to build them... then deploy to Tomcat. This is around 40seconds. So every change I make, I have to wait >=40seconds to see the change.

这变得非常令人沮丧,所以我试图加快部署速度。我通过maven部署了这个网站:爆炸了。现在,我以部署格式实时编辑文件。问题是我需要将这些更改转移到源位置,以推动我们的源代码管理。

This is becoming very frustrating, so I have tried to speed up the deployment. I deployed the site via maven with war:exploded. Now, I edit the files live in 'deployed' format. The problem being I will need to move these changes back to the source location for pushing into our source control.

所以有人写了一个脚本来取消部署服务器仔细地指向他们回到maven期望他们的位置,或者找到另一种方式,我可以立即看到我在网络浏览器中的更改。从源头重建不是一个有趣的解决方案。

So has anyone written a script to 'undeploy' changes on the server carefully pointing them back to where maven expects them to be, or found another way I can instantly see my changes in a web browser. Rebuilding from source everytime is not a fun solution.

推荐答案


目前,我必须进行更改。告诉maven来构建它们,然后部署到Tomcat。这是大约40秒。所以每一个变化,我必须等待> = 40秒才能看到这个变化。

Currently, I have to make changes... tell maven to build them... then deploy to Tomcat. This is around 40seconds. So every change I make, I have to wait >=40seconds to see the change.

这只是一个错误的方法来使用Maven在我看来,

This is just a wrong way to use Maven in my opinion.

使用像 jetty这样的东西:运行(并挂钩Eclipse远程调试器启用hotswap) ,请参阅配置Jetty, Maven和Eclipse以及热插拔

Either use something light like jetty:run (and hook Eclipse remote debugger to enable hotswap), see Configuring Jetty, Maven, and Eclipse together with Hot Swap.

或使用Eclipse WTP并将您的项目部署在Eclipse中的Tomcat服务器上(您的项目可以被识别为动态Web项目是否使用m2eclipse或Maven Eclipse插件)。

Or use Eclipse WTP and deploy your project on a Tomcat server inside Eclipse (your project can be recognized as a Dynamic Web project whether you're using m2eclipse or the Maven Eclipse plugin).

这篇关于Java maven开发慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆