title: Correct way to specify main and test resource directories in pom.xml for Spring Boot project
body: <p>I have 2 <code>application.properties</code> file in my small Spring Boot project. One is saved in <code>/src/main/resources/application.properties</code> and the other is in <code>/src/test/resources/application.properties</code>.</p>
  <p>Some values in <strong>main</strong> doesn't necessarily have to be present in <strong>test</strong>.</p>
  <p><strong>Problem :</strong> When I do maven clean -&gt; update project -&gt; maven install in Spring Tool Suite IDE, I get multiple</p>
  <blockquote>
  <p>Could not resolve placeholder 'JMS_URL' in value &quot;${JMS_URL}&quot;... and so on</p>
  </blockquote>
  <p>But if I delete the <strong>application.properties</strong> file in <strong>test</strong> <code>/src/test/resources/application.properties</code> the error goes away and I get a successful maven install build.</p>
  <p>I searched online and found that you need to specify the resources directory in pom.xml if you get that error.</p>
  <p>Like so :</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;**/*.properties&lt;/include&gt;
          &lt;/includes&gt;
      &lt;/resource&gt;
  &lt;/resources&gt;
  </code></pre>
  <p>In my case, adding that <code>&lt;resource&gt;</code> block still did not resolve my problem because it's only specifying the directory of <code>application.properties</code> in <code>src/main/resources</code> but not for <strong>test</strong></p>
  <p>What is the correct way of handling this kind of situation where you have 2 <code>application.properties</code> file in <strong>main</strong> and <strong>test</strong> resource folder?</p>
  <p>I'd appreciate any comment.</p>
  <p>Thank you.</p>