title: How to determine a file path in Maven project?
body: <p>I am using Maven for a project. In one of my java class, I need to grab a property file. I cannot use absolute file location but relative path. I tried several ways but no luck. </p>
  
  <p>The java is in</p>
  
  <pre><code>myProject/src/main/java/com/some/myConfiguration.java
  </code></pre>
  
  <p>The property file is in</p>
  
  <pre><code>myProject/src/main/com/some/resources/myProperties/myFeatures.properties
  </code></pre>
  
  <p>And in my java, I have some code like this</p>
  
  <pre><code>String filePath = "correct/path/to/myFeatures.properties";
  File repositoryFile = new File(filePath);
  </code></pre>
  
  <p>So my problem is what I should give to <code>filePath</code></p>
  
  <p>Thank you for any advice.</p>