Subsections of Building Tool
Maven
1. build from submodule
You dont need to build from the head of project.
./mvnw clean package -DskipTests -rf :<$submodule-name>you can find the <$submodule-name> from submodule ’s pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-formats</artifactId>
<version>1.20-SNAPSHOT</version>
</parent>
<artifactId>flink-avro</artifactId>
<name>Flink : Formats : Avro</name>Then you can modify the command as
./mvnw clean package -DskipTests -rf :flink-avro2. skip some other test
For example, you can skip RAT test by doing this:
./mvnw clean package -DskipTests '-Drat.skip=true'Gradle
1. spotless
keep your code spotless, check more detail in https://github.com/diffplug/spotless
And the, you can execute follwoing command to format your code.
./gradlew spotlessApply./mvnw spotless:apply2. shadowJar
shadowjar could combine a project’s dependency classes and resources into a single jar. check https://imperceptiblethoughts.com/shadow/
./gradlew shadowJar3. check dependency
list your project’s dependencies in tree view
./gradlew dependencies --configuration compileClasspath./gradlew :<$module_name>:dependencies --configuration compileClasspath