私のプロジェクトパッケージは、Springブートfat-jarにパッケージ化されています。MavenでのJARのデプロイをスキップしてアセンブリのみをデプロイする方法
私は2余分なビルドのプラグインを設定した:
- はLaunch4j Pluginを使用して、実行可能(それが結果として脂肪jarファイルを取得し、実行可能ファイルにそれを埋め込む)
- 総会ZIP で生成される実行可能ファイルを生成します
アセンブリを作成し、結果としてzipを自分のMavenリポジトリに配置します。
これは私のbuild
セクションです:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<executions>
<execution>
<id>l4j-clui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>console</headerType>
<outfile>target/${project.build.finalName}.exe</outfile>
<jar>target/${project.build.finalName}.jar</jar>
<manifest>launch4j/besser-updater.manifest</manifest>
<classPath>
<mainClass>org.springframework.boot.loader.JarLauncher</mainClass>
</classPath>
<jre>
<minVersion>1.8.0_131</minVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>32/64</runtimeBits>
</jre>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>launch4j/assembly.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
私は
瓶アーティファクトを無視して、唯一の
ジップアセンブリファイルを展開する展開段階を設定するにはどうすればよい
?
私はリモートリポジトリに期待している結果に、** zip ** artifactと** jar **しか表示されません。今私は展開を実行すると、それはjarとzipをアップロードします。 –
これはデプロイメント全体をスキップします。デプロイメント全体をスキップしたくないので、クラシファイア** jar **のデプロイのみが必要です。 –