views:

73

answers:

2

This question is something like a holy grail of project environment setting. Here goes a rationale:

Big projects tends to have poor documentation so there are a lot of trial-and-error cycles. Therefore I often use the reload-without-redeploy feature of some libraries (facelets, webflow, tapestry, jrebel...).

The easiest way to use such feature is to have the same structure in VCS as is in servlet container and point servlet container directly to the development directory.

However big projects are also often divided into some kind of modules to avoid too much complexity. This means that directory structure is very different in VCS and in the web container. Right now I even have a situation where I have two projects sharing the same core project which I need to develop simultaneously.

If the project is small enough, I'm using incremental building with ant that is run by Eclipse on save of any file. But if there are several thousands of files where timestamp needs to be compared or some other time consuming action is run, than even incremental build can be quite annoying.

The only thing that would make incremental builds faster (and therefore makes development MUCH MORE enjoyable) is some kind of IDE save action hooks that would supply ant more information about what is saved so that ant can avoid unnecessary work.

If you have ever though about this, please share your thoughts with me - your favorite project setting, IDE tips, trial-and-error strategy criticism, whatever.

For example I recently noticed the new "Web Deployment Assembly" feature, but I don't know how it can be used to make deployment dir structure synchronized with development dir structure during DEVELOPMENT, not build.

Thanks

+2  A: 

I'm not sure about Eclipse, but with IntelliJ IDEA you can set up a project so that the project directories (i.e. "modules") are arranged however you want, and it will keep the output directory in sync with them, updating them as changed, and even doing a hot-deploy automatically.

Avi
This is a great feature, I think that Eclipse can't do this (someone told me that there is a plugin for this). By the way, is it possible to synchronize file to two output folders?
calavera.info
I don't think you can have two output folders, but you can have separate production and test output folders.
Avi
A: 

Haven't jrebel make your life easier? it has IDE plug-ins as well as maven integration.

Anton Arhipov
The question is not how to reload classes at runtime, but how to do it in REALLY large scale. For example dividing the code into several projects and project modules makes IDE integreation almost impossible to set up. And as I've said, the problem with ant or maven is not that it's not possible to use it with jRebel, but that it's terribly slow in such conditions (thus erasing benefits of jrebel). And Java files are only less than half of such project and so on.
calavera.info