I am trying to find out what it is I am actually debugging. As far as I can see there is no place to specify what is actually debugged in the debugging dialog. This leads me
to believe that I am debugging the contents of out/production map generated from the last make of the project. The stuff in out/production is probably the compiled output of
the contents of the java/main map in my project. Of course, as I can see when I start the debugger, this is supplemented by the classpath to the dependencies specified
in the file -> project structure -> Module -> dependencies.
So far so good!
Now, I would like to include META-INF/persistence.xml and log4j.xml in the mix of stuff above, to get it squeezed into the classpath. The easy and simple way to do this
would be to include module dependencies of the files themselves, so that IDEA would copy them to out/production at make time. This seems to be possible by selecting
add -> Module library -> attach sources and then specifying the directory that contains the infamous files. This has no effect what so ever!
Unfortunately the only way I seem to able to do this is to package the files in a jar and then include this jar in the dependencies. But if I do that, the change of the contents
of the files is going to be be pretty complicated.
Another solution is to include the packaging of the files in an artifact build, and make certain that I build the artifact whenever I chage the content of the files. Again, pretty
Yet another solution would be to create an external script, that injects the files here and there in out/production, unfortunately this script would have to be run each time the
project is made, because IDEA clears out the out/production directory.
One could skip the IDEA build procedure alltogether and use ant or maven, but they have their drawbacks to, and it is very nice to use an integrated tool, if your project
is of a reasonable size.
Anybody got a better way?