title: Relative path in 'file' protocol for URL
body: <p>I have an implementation which reads a file and uses <code>java.net.URL</code> to take a path to open connection to.</p>
  
  <p>In production code, the link of file will be on FTP but for testing the logic I want to use a file locally which I can read using <code>file</code> protocol instead of <code>ftp</code>.</p>
  
  <p>I am using Spring and changed the file path to something like below-
  <strong>application-test.properties</strong></p>
  
  <pre><code>#file location 
  enzyme.dat.ftp.link=file:///Users/username/project/src/test-integration/resources/input.dat
  </code></pre>
  
  <p>As you can see its a absolute path, which I need to make relative to my project. How can I do it?</p>
  
  <p>I just need something like below-</p>
  
  <pre><code>#file location 
      enzyme.dat.ftp.link=file://${project.basedir}/src/test-integration/resources/input.dat
  </code></pre>