Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Ant, Maven and Other Build Tools and the fly likes src/main/config Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "src/main/config" Watch "src/main/config" New topic


Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
The maven standard directory layout guidelines specify a src/main/config folder. However I notice that files included in this folder do not seem to end up in my jar file unless I specifically specify a sourceDirectory setting inside the build node of pom.xml.

Doesn't this defeat the point if I have to manually specify this folder? Is there a reason src/main/config is not treated as a source folder by default in maven? Should I be putting stuff in that folder (i.e. log4j.xml) at all? If so, what is appropriate to put there and how is it different than src/main/resources?
David Newton

Joined: Sep 29, 2008
Posts: 12617

Application resources should go in src/main/resources: "application resources". I always assumed that src/main/config was for any other configuration stuff.
I agree. Here's the link:
subject: src/main/config
It's not a secret anymore!