title: Where in maven project's path should I put configuration files that are not considered resources
body: <p>I have a simple java maven project. One of my classes when executing needs to load an xml configuration file from the classpath. I don't want to package such xml file when producing the jar but I want to include a default xml file in a zip assembly under a conf subfolder and I also want this default xml to be available in the unit tests to test against it. </p>
  
  <p>As I see it there are 2 possible places of this default xml:</p>
  
  <ol>
  <li><code>src/main/resources/conf/default.xml</code></li>
  <li><code>src/main/conf/default.xml</code></li>
  </ol>
  
  <p>Both solutions demand special pom actions:  </p>
  
  <ul>
  <li><p>In solution 1, I get the auto copy to target folder during build which means it is available in testing but I also get it in the produced jar which i don't want. </p></li>
  <li><p>In solution 2, I get the jar as I want it(free of the xml) but I manually have to copy the xml to the target folder to be available for testing. (I don't want to add src's subfolders in test classpath. I think it is bad practice).</p></li>
  </ul>
  
  <p><strong>Question: what is the best solution of the two?</strong><br>
  - If the correct is 2, what is the best way to copy it to target folder?<br>
  - Is there any other solution better and more common than those two?</p>
  
  <p>(I also read <a href="https://stackoverflow.com/questions/465001/where-should-i-put-application-configuration-files-for-a-maven-project">Where should I put application configuration files for a Maven project?</a> but I would like to know the most "correct solution" from the "convention over configuration" point of view and this link provides some configuration type solutions but not any convention oriented. Maybe there isn't one but I ask anyway. Also the solutions provided include AntRun plugin and appAssembler plugin and I wonder if I could do it with out them.)</p>