This is an automated email from the ASF dual-hosted git repository.
jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git
The following commit(s) were added to refs/heads/master by this push:
new b8e98e263 [AMORO-2853] Improve the packaging and compilation process
for amoro project (#2854)
b8e98e263 is described below
commit b8e98e263cc62c1b7cd368910025563a2d070abd
Author: xleoken <[email protected]>
AuthorDate: Thu May 23 11:39:06 2024 +0800
[AMORO-2853] Improve the packaging and compilation process for amoro
project (#2854)
---
.github/workflows/core-hadoop2-ci.yml | 3 +-
.github/workflows/core-hadoop3-ci.yml | 3 +-
.github/workflows/trino-ci.yml | 3 +-
CONTRIBUTING.md | 6 ++--
README.md | 6 ++--
.../amoro-mixed-format-trino/pom.xml | 42 ++++++++++++++++++++++
docs/admin-guides/deployment.md | 2 +-
7 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/core-hadoop2-ci.yml
b/.github/workflows/core-hadoop2-ci.yml
index 494388765..dce056956 100644
--- a/.github/workflows/core-hadoop2-ci.yml
+++ b/.github/workflows/core-hadoop2-ci.yml
@@ -18,6 +18,7 @@ on:
- "master"
- "0.**"
paths:
+ - ".github/workflows/**"
- "amoro-ams/**"
- "amoro-core/**"
- "amoro-mixed-format/amoro-mixed-format-flink/**"
@@ -43,7 +44,7 @@ jobs:
run: mvn validate
- name: Build all module with Maven
- run: mvn clean install -pl
'!amoro-mixed-format/amoro-mixed-format-trino' -Djacoco.flink.skip=true -B -ntp
-Dhadoop=v2
+ run: mvn clean install -Djacoco.flink.skip=true -B -ntp -Dhadoop=v2
- name: Code coverage
uses: codecov/codecov-action@v3
diff --git a/.github/workflows/core-hadoop3-ci.yml
b/.github/workflows/core-hadoop3-ci.yml
index cbf55f589..44a6c85d5 100644
--- a/.github/workflows/core-hadoop3-ci.yml
+++ b/.github/workflows/core-hadoop3-ci.yml
@@ -18,6 +18,7 @@ on:
- "master"
- "0.**"
paths:
+ - ".github/workflows/**"
- "amoro-ams/**"
- "amoro-core/**"
- "amoro-mixed-format/amoro-mixed-format-flink/**"
@@ -43,7 +44,7 @@ jobs:
run: mvn validate
- name: Build all module with Maven
- run: mvn clean install -pl
'!amoro-mixed-format/amoro-mixed-format-trino' -Djacoco.flink.skip=true -B -ntp
+ run: mvn clean install -Djacoco.flink.skip=true -B -ntp
- name: Code coverage
uses: codecov/codecov-action@v3
diff --git a/.github/workflows/trino-ci.yml b/.github/workflows/trino-ci.yml
index f97f1a9d6..c5b11d114 100644
--- a/.github/workflows/trino-ci.yml
+++ b/.github/workflows/trino-ci.yml
@@ -18,6 +18,7 @@ on:
- "master"
- "0.**"
paths:
+ - ".github/workflows/**"
- "amoro-ams/**"
- "amoro-core/**"
- "amoro-mixed-format/amoro-mixed-format-hive/**"
@@ -41,7 +42,7 @@ jobs:
run: mvn validate -P trino-spotless
- name: Build trino module with Maven
- run: mvn clean install -pl
'amoro-mixed-format/amoro-mixed-format-trino' -Dhadoop=v2 -am -B -P
trino-spotless
+ run: mvn clean install -pl
'amoro-mixed-format/amoro-mixed-format-trino' -Dhadoop=v2 -am -B -P
trino-spotless,build-mixed-format-trino
- name: Code coverage
uses: codecov/codecov-action@v3
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9eb56d4c6..07d7faf53 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -102,15 +102,15 @@ Amoro is built using Maven with Java 1.8 and Java 17(only
for `amoro-mixed-forma
* To invoke a build and run tests: `mvn package -P toolchain`
* To skip tests: `mvn -DskipTests package -P toolchain`
-* To package without trino module and JAVA 17 dependency: `mvn clean package
-DskipTests -pl '!amoro-mixed-format/amoro-mixed-format-trino'`
+* To package without trino module and JAVA 17 dependency: `mvn clean package
-DskipTests`
* To build with hadoop 2.x(the default is 3.x) `mvn clean package -DskipTests
-Dhadoop=v2`
* To indicate Flink version for optimizer (the default is 1.18.1): `mvn clean
package -Dflink-optimizer.flink-version=1.15.4`. If the version of Flink is
below 1.15.0, you also need to add the `-Pflink-pre-1.15` parameter: `mvn clean
package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6`.
`mvn clean package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6
-DskipTests`
>Spotless is skipped by default in `trino` module. So if you want to perform
>checkstyle when building `trino` module, you must be in a Java 17 environment.
-* To invoke a build include `amoro-mixed-format/amoro-mixed-format-trino`
module in Java 17 environment: `mvn clean package -DskipTests -P trino-spotless`
-* To only build `amoro-mixed-format/amoro-mixed-format-trino` and its
dependent modules in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless -pl 'amoro-mixed-format/amoro-mixed-format-trino' -am`
+* To invoke a build include `amoro-mixed-format/amoro-mixed-format-trino`
module in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless,build-mixed-format-trino`
+* To only build `amoro-mixed-format/amoro-mixed-format-trino` and its
dependent modules in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless,build-mixed-format-trino -pl
'amoro-mixed-format/amoro-mixed-format-trino' -am`
## Code suggestions
diff --git a/README.md b/README.md
index adc83c388..41f158dce 100644
--- a/README.md
+++ b/README.md
@@ -132,15 +132,15 @@ Amoro is built using Maven with Java 1.8 and Java 17(only
for `amoro-mixed-forma
* To invoke a build and run tests: `mvn package -P toolchain`
* To skip tests: `mvn -DskipTests package -P toolchain`
-* To package without trino module and JAVA 17 dependency: `mvn clean package
-DskipTests -pl '!amoro-mixed-format/amoro-mixed-format-trino'`
+* To package without trino module and JAVA 17 dependency: `mvn clean package
-DskipTests`
* To build with hadoop 2.x(the default is 3.x) `mvn clean package -DskipTests
-Dhadoop=v2`
* To indicate Flink version for optimizer (the default is 1.18.1): `mvn clean
package -Dflink-optimizer.flink-version=1.15.4`. If the version of Flink is
below 1.15.0, you also need to add the `-Pflink-pre-1.15` parameter: `mvn clean
package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6`.
`mvn clean package -Pflink-pre-1.15 -Dflink-optimizer.flink-version=1.14.6
-DskipTests`
>Spotless is skipped by default in `trino` module. So if you want to perform
>checkstyle when building `trino` module, you must be in a Java 17 environment.
-* To invoke a build include `amoro-mixed-format/amoro-mixed-format-trino`
module in Java 17 environment: `mvn clean package -DskipTests -P trino-spotless`
-* To only build `amoro-mixed-format/amoro-mixed-format-trino` and its
dependent modules in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless -pl 'amoro-mixed-format/amoro-mixed-format-trino' -am`
+* To invoke a build include `amoro-mixed-format/amoro-mixed-format-trino`
module in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless,build-mixed-format-trino`
+* To only build `amoro-mixed-format/amoro-mixed-format-trino` and its
dependent modules in Java 17 environment: `mvn clean package -DskipTests -P
trino-spotless,build-mixed-format-trino -pl
'amoro-mixed-format/amoro-mixed-format-trino' -am`
## Quickstart
diff --git a/amoro-mixed-format/amoro-mixed-format-trino/pom.xml
b/amoro-mixed-format/amoro-mixed-format-trino/pom.xml
index f25bf1e13..eebefece9 100644
--- a/amoro-mixed-format/amoro-mixed-format-trino/pom.xml
+++ b/amoro-mixed-format/amoro-mixed-format-trino/pom.xml
@@ -552,6 +552,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
+ <configuration>
+ <skipAssembly>true</skipAssembly>
+ </configuration>
<executions>
<execution>
<id>make-assembly</id>
@@ -572,6 +575,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
+ <skip>true</skip>
+ <skipMain>true</skipMain>
<verbose>true</verbose>
<fork>true</fork>
<compilerVersion>17</compilerVersion>
@@ -615,6 +620,43 @@
</build>
<profiles>
+ <profile>
+ <id>build-mixed-format-trino</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <skip>false</skip>
+ <skipMain>false</skipMain>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <skipAssembly>false</skipAssembly>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+
<finalName>amoro-mixed-trino-${project.version}</finalName>
+ <descriptor>assembly.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>toolchain</id>
<build>
diff --git a/docs/admin-guides/deployment.md b/docs/admin-guides/deployment.md
index f16da21c1..543524737 100644
--- a/docs/admin-guides/deployment.md
+++ b/docs/admin-guides/deployment.md
@@ -35,7 +35,7 @@ You can build based on the master branch without compiling
Trino. The compilatio
git clone https://github.com/apache/amoro.git
cd amoro
base_dir=$(pwd)
-mvn clean package -DskipTests -pl
'!amoro-mixed-format/amoro-mixed-format-trino'
+mvn clean package -DskipTests
cd amoro-ams/dist/target/
ls
amoro-x.y.z-bin.zip # AMS release package