General launch configurations in intellij and paths to active module

I am moving from eclipse to intellij and somehow ( http://devnet.jetbrains.com/thread/452846 ) I would like to have a variable comparable to eclipse's $ {project_loc}. After seeing some of the answers, I found out that I can use environment variables, but that is not exactly what I want.

I would really like intellij to be able to detect which module has focus and then run using that module base directory as the execution path. I have a group of modules in which I want to run the same launch configuration at different times. I don't want to define separate launch configurations for each individual module.

This is how I did it in eclipse, so I tend to want to do it the same way. If perhaps there is another way to achieve the same goal, I'm all for it. Here's our use case:

We have several jars, each containing javascript files. As part of the build process, these javascript files are pulled from the jar and merged together in the all.js file. During development, we want to be able to update this all.js file on the fly while the server is running. Due to the aggregation step, we cannot use the built-in hot-swap functionality to update client resources. To do this, we created a launch configuration that, when launched, will aggregate js and copy it to the local application server.

This launch configuration for eclipse is currently used for this for several projects as well as many developers. Again, the main desire is a shared variable that does not depend on the project and the module, as well as the base path to that module.

Any suggestions?

+3


source to share





All Articles