title: Using Maven ClassLoader.getSystemClassLoader().getResource() return null
body: <p>My project directory structure (in Eclipse):</p>
  
  <pre><code>MyProject/
      src/main/Java
      src/main/resources  
          stories
              file.story
  </code></pre>
  
  <p>In Main class i have return below line which return null while excuting main class through MAVEN</p>
  
  <pre><code>String folderName = "stories";
  URL appURL = ClassLoader.getSystemClassLoader().getResource(folderName);
  </code></pre>
  
  <p>While executing through maven, appURL returns NULL.</p>
  
  <p>By reading one post on Stackoverflow i got to kanow that, i am running the webapp on server but there is no reference to the resources on the server so we need to add some code in POM.xml file. i have added below code in POM.xml file but still its not working :(</p>
  
  <pre><code>&lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/main/resources&lt;/directory&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;includes&gt;
                  &lt;include&gt;stories&lt;/include&gt;
              &lt;/includes&gt;
          &lt;/resource&gt;
  
      &lt;/resources&gt;
  </code></pre>
  
  <p>Looking for help.</p>