私はspring-boot-maven-pluginを入手して、2つの異なるメインクラスの再パッケージ化された2つのjarをビルドしようとしています。構成ブロックでの具体的なmainClassパラメータで2つの実行ブロックをI'addedが、構成ブロックは、実行ブロックの内部ではなく、プラグインレベルで、私はいつもSpring Bootで2つの再パッケージ化されたjarをビルドするには
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]
を取得するためのプラグインはそれを尊重していないようですここにpomのプラグインのmaven-spring-boot-mavenのプラグインセクションがあります。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>${artifactId}</id>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>com.mystuff.tools.loadtester.Application</mainClass>
<finalName>${artifactId}</finalName>
</configuration>
</execution>
<execution>
<id>b4-commandline</id>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>com.mystuff.tools.b4commandline.Application</mainClass>
<finalName>b4-commandline</finalName>
</configuration>
</execution>
</executions>
</plugin>
この上の任意のヘルプは素晴らしいことです。 maven-pluginのstackoverflowでレシピを見ましたが、それらはspring-bootには当てはまりません。