maven-assembly-pluginを使用して、アプリケーションのjarファイルに外部依存関係をパックしたいと考えています。私がmvnのインストールを呼び出すと、2つのjarファイルが作成されます.1つはjwファイル、もう1つは依存ファイルがありません。 (appname-version.jarとappname-version-jar-with-dependencies.jar)Mavenアセンブリプラグインは、2つの予期しないjarを作成します
なぜ私は2つのjarファイルを作成するのですか?ここで
はプラグインです:(イムは、現時点では、他のプラグインを使用していない)
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.coolapp.mainClass</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
ありがとうございます!
私の答えを – alexbt