title: Exclude some test Classes when building spring boot app
body: <p>I have a big java project and want to build test classes for several parts of the project.</p>
  
  <p>I have the Context test in the Root package of my spring boot test folder.</p>
  
  <pre><code>-Test
   -Root
    -ParentContextTest.class
    -ChildContextTest.class
   -FocusedTest
    -UserPermissioningTest.class &lt;- extends ChildContextTest.class
  </code></pre>
  
  <p>I want to arrange my test package like the above so when am building the project only the main context are tested and anything in FocusedTest package don't run.</p>
  
  <p>FocusedTest test classes extend the corresponding Context when running the test manually.</p>
  
  <p>Am using spring boot + maven.</p>
  
  <p>Any help would be great.</p>
  
  <p>Am using Spring boot Build in pom Like below</p>
  
  <pre><code>&lt;plugin&gt;
       &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
       &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
       &lt;configuration&gt;
             &lt;fork&gt;true&lt;/fork&gt;
             &lt;executable&gt;true&lt;/executable&gt;
             &lt;excludes&gt;
               &lt;exclude&gt;
                &lt;groupId&gt;com.Test.FocusedTest&lt;/groupId&gt;
               &lt;/exclude&gt;
              &lt;/excludes&gt;
        &lt;/configuration&gt;
   &lt;/plugin&gt;
  </code></pre>