Is it possible to use only one logback.properties file across multiple modules?

Viewed 483

Let's say you have a Maven project Alpha. And this project Alpha contains the following modules A, B, C & CommonModule. Now, each module contains its' own resource folder where you would place logback.xml and logback.properties.

Is it possible to use only one logback.properties file across the multiple modules?

If so, how may I put the logback.properties files within the CommonModule and have the POM files for the modules resource the CommonModule/config folder?

My properties file works just fine within a module but I need to eliminate the redundancy of the file in the project so at build time it only ever uses the logback.properties file that I have placed into the CommonModule/config folder.

I was thinking that I just need to set the POM resource section but cannot figure out how to make it read from the folder as it always appears to read from the module down.

This will eventually be going to a Spring-Boot application but I'm just taking it one step at a time here.

Also, I'm not very familiar Maven and don't know anything about Spring-Boot at the moment (working on that).

0 Answers
Related