title: Apache Velocity : Velocity.getTemplate fails to load the vm file
body: <p>I know that it could be a very basic issue but i am stuck for sometime and need help. I have created  a maven project in IntelliJ for testing Apache Velocity.</p>
  
  <p>Directory Structure</p>
  
  <ul>
  <li><p>project/src/main/java/CodeGenerator.java    </p></li>
  <li><p>project/src/main/resources/test.vm</p></li>
  </ul>
  
  <p>For some reason, I am getting "SEVERE: ResourceManager : unable to find resource 'test.vm' in any resource loader." exception.</p>
  
  <p>I tried setting resource class and other options available on internet and it failed. I am sure i am missing something obvious but not able to figure it out yet.</p>
  
  <p>Any help  or how to tutorials ?</p>
  
  <pre><code>public class CodeGenerator {
  
      public static void main(String[] args) {
  
          VelocityEngine velocityEngine = new VelocityEngine();
          velocityEngine.init();
          Template template = null;
          //template = Velocity.getTemplate("resources/test.vm"); //not working
         // template = Velocity.getTemplate("test.vm");  //not working
          template = Velocity.getTemplate("/src/main/resources/test.vm"); // This is working now - 
      }
  }
  </code></pre>