Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specifying logback.xml in Java Maven project

I have a Java maven project where I need to use logback as the logging framework. I have placed the logback.xml configuration file in the src/main/conf folder. However, it looks like it is not getting picked up because src/main/conf is not in the class path. On building the project I copy all the contents of that folder to target/root/conf and wanted to have that directory as part of my classpath. Can anyone let me know how can I force that?

like image 919
user243655 Avatar asked Nov 18 '13 03:11

user243655


1 Answers

In a Maven project the default directory for resource file is src/main/resources. This is the layout directory, if you still want to change this default, follow these instructions.

like image 65
lquitadamo Avatar answered Sep 28 '22 15:09

lquitadamo