java vagrant,vagrant对java / javaee开发人员有用吗?

When working with java/javaee usual development environment setup is to have everything locally (jdk installation, database, appserver etc). I know a lot of people in ruby/js world use virtual machines for development (mainly with vagrant).

I wonder if there is an efficient way to set up similar env for java/javaee.

I suspect that I can easily install database server and application server together with jdk version on such virtual machine, but what about regular development? I still need to have jdk installed locally, right? (I need my IDE to work properly) I need maven to build my project, so that I need full maven local repo. And then I need to deploy my app on virtual machine's app server.

I can see no real advantage here (still having pieces of environment on both machines).

Do you have any experience with that and can share with me?

解决方案

Vagrant is basically a tool for setting up a VirtualBox virtual machine. It brings to the table the ability to quickly provision a VM and the ability to pass the provisioning recipe to others.

This is really useful in the Ruby/JS community because they don't have a compile step. The way we use it is the code stays on my local machine and all the runtime is done on the VM. If I make a change on my local computer the running program on the VM instantly picks up the change and the runtime is modified just as if the code was only on the VM. I literally don't even have to have Ruby/JS installed on my computer.

In the Java/.Net world you have a compile step so as you say you need Java and all the jars you need to compile against on your machine. This lessens some of the usefulness of the setup.

On the other hand you usually have databases, message queues, containers, etc. that you are working with and on a team it may be a pain to shoot an email and say update your db to this version and load the new sample data. In Vagrant only one person needs to make the updates and they can then tell you to grab the new VM and you do not have to do any of the upgrade steps yourself.

So it is still useful in a compiled language but it is less useful than in a scripting language.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值