title: Resource is loaded in Eclipse but not in IntelliJ
body: <p>I know, similar questions have been asked here, but none of them seemed to fit my exact problem. I have the following (partial) directory structure:</p>
  
  <pre><code>src
    |__view
         |__TweetView.java
         |__TweetView.html
  </code></pre>
  
  <p>In TweetView.java, I'm trying to get the resource URL of TweetView.html as follows:</p>
  
  <pre><code>String htmlDocName = "TweetView.html";
  Class thisClass = this.getClass();
  URL htmlResourceURL = thisClass.getResource(htmlDocName);
  </code></pre>
  
  <p>This works fine in Eclipse (Neon.2), but in IntelliJ (2017.2.3), <code>htmlResourceURL</code> is always <code>null</code>. I'm aware that the location of the HTML file might not be ideal (should go in a resources folder), but for various reasons, I am not supposed to change this right now.</p>
  
  <p>I observed that the src-folder is marked as a "Sources" folder in the project structure in IntelliJ, and its sub-folders aren't explicitly marked. Project settings aren't shared across Eclipse and IntelliJ, since the project uses Maven. Note: The problem is stated with regard to running the project as a Java Application directly from within the respective IDEs, not to a JAR/WAR export.</p>
  
  <p>I saw that IntelliJ has these "Resource patterns" which define what file types should be considered as resources, but I couldn't get it to work by adding .html, neither with nor without wildcards (and according to the IntelliJ website, .html is considered a resource by default anyway).</p>
  
  <p>Does anyone have an idea what the problem might be? Since it works in Eclipse, I would ideally like to solve the problem through a configuration in IntelliJ, rather than changing the code.</p>
  
  <p><em>EDIT:</em>
  Here's my POM:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;demo&lt;/groupId&gt;
  &lt;artifactId&gt;demo&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.5.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;src/view&lt;/directory&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
  &lt;/build&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.twitter&lt;/groupId&gt;
          &lt;artifactId&gt;hbc-twitter4j&lt;/artifactId&gt;
          &lt;version&gt;2.2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;jetty-server&lt;/artifactId&gt;
          &lt;version&gt;9.4.0.M1&lt;/version&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>