Maven Shade Plugin を使用して jar を取得しようとしていますが、まだ成功していません。
これは私のプロジェクト構造です:
MainModule
-Module1
-src
-pom.xml
-Module2
-src
-pom.xml
-pom.xml
Module1 (pom.xml):
<parent>
<artifactId>MainModule</artifactId>
<groupId>com.plugintest</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Module1</artifactId>
Module2 (pom.xml):
<parent>
<artifactId>MainModule</artifactId>
<groupId>com.plugintest</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>Module1</artifactId>
メインモジュール (pom.xml):
<groupId>com.plugintest</groupId>
<artifactId>MainModule</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>Module1</module>
<module>Module2</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
このコードによると、2 つの jar ファイル (Module1-version.jar と Module2-version.jar) を取得します。しかし、それは私が望むものではありません。もう一方 (Module1 と Module2) を含む 1 つの jar ファイル (MainModule-version.jar) を取得したいと考えています。
この Shade プラグインが機能しないのはなぜですか?