title: How to get resources folder(files) from other maven module?
body: <p>I have some amount of child maven modules in parent module.
  How can I get access from one module to resources of another and to have this solution stable in jar file ?
  I tried something like: (resource.txt - is situated in first module, and code is executing in second)</p>
  
  <pre><code>String pathToFirstModuleResource = ClassFromFirstModule.class.getClassLoader().getResource(resource.txt).getFile();
  </code></pre>
  
  <p>But it points me to <code>...firstmodule/target/classes/resource.txt</code>, so it works almost good, but returns not a resource folder, but <code>target/classes</code>. Why it returns this targets folder, though should to return <code>...firstmodule/resources/resource.txt</code>?</p>