I'm just starting to use
ant with IntelliJ IDEA.
Over time, I have used many different IDEs to manage my build environment, I have used ant, and I have written manual build scripts (batch files).
But I'm having trouble understanding what I can and can't do with respect to using ant in my
IDE. For example, in an IDEA-only project, I set up my source paths, my classpaths for compilation, and my output path. It compiles *all* the source files, using any pre-compiled libs in the classpaths, and writes the output .class files to another directory. When I "run" the project, it calls the main method of a class I just compiled in that output directory, and it uses the same classpath for any libraries it needs at runtime; it doesn't have to copy all the .jar files for example to the output directory to run.
So I am a happy camper, building and running and getting to use the debugger for free! I really like the debugger.
Now, I know ant has many advantages as a build tool, so I'd like to use that with IDEA. I'd like to click my "run" button in IDEA, and have it know (because I configured it that way) to run a certain ant task, THEN use the files that ant created; for example, if my ant task creates a "build" directory of its own, look for my main class in that directory, NOT the compiler output directory it normally uses. In this way, I could get seamless ant integration, and debugging.
As it is now, all I seem to be able to do is select an ant task from my build.xml file to be executed. It does all the work outside the IDEA. I can even have an ant task to run the app after it is done building it; but again it's outside the IDE and so I can't use the debugger.
Since I'm new to this, I'd appreciate some pointers.
Thanks in advance!