I have a java-project that is developed with help of maven. Part of the project is unit-testing. I plan to put all temporary files that are produced by unittests into maven's target directory. This might be a good idea, because if for whatever reason temporary files are not removed by unittests, target directory may be cleaned and with it all temporary files still lying around in the file-system. So i found filtering function of the maven resources plugin and was wondering if it possible to instantiate it for my usecase. My plan is to have an entry in the properties file like this
targetdir = ${project.build.directory}
which should offer me a property that reveals the location of mavens target-directory. Now, caveeat is, the filtered property file is stored in the target directory by the maven resource plugin.
How can i find it there? I need the properties file to tell me where the target-directory is, but the properties-file is in the target directory?
Is my approach still worth beeing done? Or is it not possible this way?