title: How can I build two repackaged jars with Spring Boot
body: <p>I'm trying to get spring-boot-maven-plugin to build two repackaged jars for two different main classes. I'added two execution blocks with their specific mainClass parameter in the configuration block but it seems that the plugin does not respect it because the configuration block is inside the execution block and not on plugin level and I always get </p>
  
  <pre><code>Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.3.0.RELEASE:repackage failed: Unable to find a single main class from the following candidates [com.mystuff.tools.b4commandline.Application, com.mystuff.tools.loadtester.Application]
  </code></pre>
  
  <p>here's the plugin section of maven-spring-boot-maven plugin of the pom.</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;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;${artifactId}&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;repackage&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;mainClass&gt;com.mystuff.tools.loadtester.Application&lt;/mainClass&gt;
                          &lt;finalName&gt;${artifactId}&lt;/finalName&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;b4-commandline&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;repackage&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;mainClass&gt;com.mystuff.tools.b4commandline.Application&lt;/mainClass&gt;
                          &lt;finalName&gt;b4-commandline&lt;/finalName&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Any help on this would be great. I saw recipes on stackoverflow for the maven-plugin but those do not apply to spring-boot.</p>