title: How to override a plugin from the parent in pom.xml?
body: <p>My pom.xml has this in it:</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.4.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>I believe this parent provides the <strong>maven-surefire-plugin</strong>. However, I need to change the configuration of the <strong>maven-surefire-plugin</strong> so that log4j logs are not printed to the console during tests. I should be able to do it by changing the pom.xml, according to <a href="https://stackoverflow.com/questions/13935715/disabling-log4j-logs-during-maven-test-phase">this post</a>.</p>
  
  <p>However, I have tried adding the following to my pom.xml:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.5&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;forkMode&gt;always&lt;/forkMode&gt;
                  &lt;systemPropertyVariables&gt;
                      &lt;log4j.configuration&gt;file:src/test/resources/log4j-silent.properties&lt;/log4j.configuration&gt;
                  &lt;/systemPropertyVariables&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>But logs are still being printed to the screen. I suspect it's because I'm not properly overriding the <strong>maven-surefire-plugin</strong> that <strong>spring-boot-starter-parent</strong> provides.</p>