Maven multi module project and working directory for tests

Hi,

we are having a Maven multi-module project here. The project was created in IntelliJ using "New Project > Import Project from external Module" then going to the root pom. The project can be created by specifying a separate folder to keep the project files in. Every time I am adding a unit test by right clicking and "Add XyzTest" I need the working directory to be the module directory of the module that contains the test. I think this can be fixed by using the path variable $MODULE_DIR$ correct? This won't work however if the *.iml files are in a different location. Is there a workaround for this or is the only way to fix this to keep the iml files in the Maven modules?

/Reik

Please sign in to leave a comment.