I created a simple gradle project that builds and runs a simple java 9 module.
This module requires only log4j and expects to find a log4j2.xml file to configure the logger.
The problem I am having is that it seems that this file is not added to the module classpath and when I execute./gradlew run
I always get "ERROR StatusLogger No log4j2 configuration file found. Using default configuration:" as the first output line, which means it could not find the file (which is under src/main/resources).
If I import this project in IntelliJ and run it, I get the exact same error.
Am I doing something wrong? Shouldn't this file be automatically added to the module classpath?