Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/mvn-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
cache: maven

- name: Build all module with Maven
run: mvn clean install -ntp -B
run: ./mvnw clean install -ntp -B
2 changes: 1 addition & 1 deletion .github/workflows/mvn-license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
cache: maven

- name: Apache License Check
run: mvn apache-rat:check -B
run: ./mvnw apache-rat:check -B
4 changes: 2 additions & 2 deletions .github/workflows/package-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: Parse Version Number
run: echo "VERSION=$(echo ${{ github.event.release.tag_name }} | sed -e s/v//)" >> $GITHUB_ENV
- name: Set Version
run: mvn versions:set -DnewVersion="$VERSION"
run: ./mvnw versions:set -DnewVersion="$VERSION"
- name: Publish package
run: mvn -ntp --batch-mode deploy -DskipTests
run: ./mvnw -ntp --batch-mode deploy -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

# syntax=docker/dockerfile:1

FROM maven:3.9.8-eclipse-temurin-11-focal as package
FROM eclipse-temurin:17-jdk-jammy as package

WORKDIR /build

COPY ./ ./
RUN --mount=type=cache,target=/root/.m2 \
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.defaultLogLevel=warn mvn -B package -DskipTests
RUN mv xtable-utilities/target/xtable-utilities_2.12-$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)-bundled.jar target/app.jar
MAVEN_OPTS=-Dorg.slf4j.simpleLogger.defaultLogLevel=warn ./mvnw -B -am -pl xtable-utilities package -DskipTests
RUN mv xtable-utilities/target/xtable-utilities_2.12-$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)-bundled.jar target/app.jar

FROM eclipse-temurin:17-jre-jammy AS final

Expand All @@ -48,7 +48,7 @@ COPY --from=package build/target/app.jar ./app.jar
ENTRYPOINT [ \
"java", \
"--add-opens=java.base/sun.nio.hb=ALL-UNNAMED", \
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", \
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", \
"--add-opens=java.base/java.nio=ALL-UNNAMED", \
"--add-opens=java.base/java.lang.invoke=ALL-UNNAMED", \
"--add-opens=java.base/java.util=ALL-UNNAMED", \
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ future.

# Building the project and running tests.
1. Use Java 11 for building the project. If you are using another Java version, you can use [jenv](https://github.com/jenv/jenv) to use multiple Java versions locally.
2. Build the project using `mvn clean package`. Use `mvn clean package -DskipTests` to skip tests while building.
3. Use `mvn clean test` or `mvn test` to run all unit tests. If you need to run only a specific test you can do this
by something like `mvn test -Dtest=TestDeltaSync -pl xtable-core`.
4. Similarly, use `mvn clean verify` or `mvn verify` to run integration tests.
2. Build the project using `./mvnw clean package`. Use `./mvnw clean package -DskipTests` to skip tests while building.
3. Use `./mvnw clean test` or `./mvnw test` to run all unit tests. If you need to run only a specific test you can do this
by something like `./mvnw test -Dtest=TestDeltaSync -pl xtable-core`.
4. Similarly, use `./mvnw clean verify` or `./mvnw verify` to run integration tests.

**Note:** When using Maven version 3.9 or above, Maven automatically caches the build. To ignore build caching, you can
add the `-Dmaven.build.cache.enabled=false` parameter. For example, `mvn clean package -DskipTests -Dmaven.build.cache.enabled=false`
add the `-Dmaven.build.cache.enabled=false` parameter. For example, `./mvnw clean package -DskipTests -Dmaven.build.cache.enabled=false`


# Style guide
1. We use [Maven Spotless plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven) and
[Google java format](https://github.com/google/google-java-format) for code style.
2. Use `mvn spotless:check` to find out code style violations and `mvn spotless:apply` to fix them.
2. Use `./mvnw spotless:check` to find out code style violations and `./mvnw spotless:apply` to fix them.
Code style check is tied to compile phase by default, so code style violations will lead to build failures.

# Running the bundled jar
1. Get a pre-built bundled jar or create the jar with `mvn install -DskipTests`
1. Get a pre-built bundled jar or create the jar with `./mvnw install -DskipTests`
2. Create a yaml file that follows the format below:
```yaml
sourceFormat: HUDI
Expand Down
2 changes: 1 addition & 1 deletion demo/start_demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ CURRENT_DIR="$( cd "$(dirname "$0")" ; pwd -P )"
XTABLE_HOME="$( cd "$(dirname "$CURRENT_DIR")" ; pwd -P )"
cd $XTABLE_HOME

mvn install -am -pl xtable-core -DskipTests -T 2
./mvnw install -am -pl xtable-core -DskipTests -T 2
mkdir -p demo/jars
cp xtable-hudi-support/xtable-hudi-support-utils/target/xtable-hudi-support-utils-0.2.0-SNAPSHOT.jar demo/jars
cp xtable-api/target/xtable-api-0.2.0-SNAPSHOT.jar demo/jars
Expand Down
Loading