Skip to content

build: 支持打包zip产物 #2129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ The build commands require the installation and setup of Java 17 or higher and M

# Pack

1. IDEA artifact packaging\
1. IDEA artifact aggregation packaging\
Configuration: Project Structure -> Artifacts -> Add New JAR -> Extract to Target JAR -> Choose your own manifest
file
path -> Done\
Package: Build -> Build Artifacts -> Build
2. It is recommended to package through `mvn package`.
2. It is recommended to package with `mvn package`, and the dependencies are in the lib folder
3. For smc and qe projects, you can also generate zip products by specifying Profile=zip (javafx.platform=win/mac/linux)
`mvn -Djavafx.platform=win -Dmaven.test.skip=true -Pzip package`

# Integration builds

Expand Down
6 changes: 4 additions & 2 deletions README_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ frameとloginは基本モジュールで、Java SPI経由でプラグイン可

# パッケージ化

1. IDEA アーティファクトのパッケージ化\
1. IDEAアーティファクト集約パッケージ\
構成:プロジェクト構造 -> アーティファクト -> JARを追加 -> ターゲットJARに展開 ->
独自のマニフェスト・ファイル・パスを選択 -> 完了\
パッケージング:ビルド -> アーティファクトのビルド -> ビルド
2. 「`mvn package`」を通じてパッケージ化することをお勧めします
2. `mvn package`でパッケージ化することが推奨され、依存関係はlibフォルダにあります。
3. smc および qe プロジェクトでは、Profile=zip (javafx.platform=win/mac/linux) を指定して zip 製品を生成することもできます。
`mvn -Djavafx.platform=win -Dmaven.test.skip=true -Pzip package`

# インテグレーションのビルド

Expand Down
6 changes: 4 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ frame 和 login 是基础模块, 通过java SPI实现可拔插,方便应用模

# 打包

1. IDEA工件打包\
1. IDEA工件打聚合包\
配置: 项目结构 -> 工件 -> 新增JAR -> 提取到目标JAR -> 选择自己的清单文件路径 -> 完成\
打包: 构建 -> 构建工件 -> 构建
2. 推荐`mvn package`打包
2. 推荐`mvn package`打包, 依赖在lib文件夹下
3. 对于smc和qe工程,通过指定Profile=zip还可以生成zip产物 (javafx.platform=win/mac/linux)
`mvn -Djavafx.platform=win -Dmaven.test.skip=true -Pzip package`

# 集成构建

Expand Down
64 changes: 64 additions & 0 deletions qe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,68 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>zip</id>
<properties>
<!-- win/mac/linux -->
<javafx.platform>win</javafx.platform>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>qeTool-${javafx.platform}</finalName>
<descriptors>
<descriptor>config/zip.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-zip-md5</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<checksum algorithm="SHA-256"
file="${project.build.directory}/qeTool-${javafx.platform}.zip"
property="file.sha256"/>
<!--suppress UnresolvedMavenProperty -->
<echo file="${project.build.directory}/qeTool-${javafx.platform}.zip.sha256"
message="${file.sha256}"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
61 changes: 61 additions & 0 deletions smc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -309,5 +309,66 @@
</plugins>
</build>
</profile>
<profile>
<id>zip</id>
<properties>
<!-- win/mac/linux -->
<javafx.platform>win</javafx.platform>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>smcTool-${javafx.platform}</finalName>
<descriptors>
<descriptor>config/zip.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-zip-md5</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<checksum algorithm="SHA-256"
file="${project.build.directory}/smcTool-${javafx.platform}.zip"
property="file.sha256"/>
<!--suppress UnresolvedMavenProperty -->
<echo file="${project.build.directory}/smcTool-${javafx.platform}.zip.sha256"
message="${file.sha256}"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading