get folder on the fly so that it works for both mvn and Intellij