• 记flinkx打包的一次报错

执行代码格式化: mvn spotless:apply
再次打包即可成功

  • 代码自动格式化插件
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    <plugin>
    <groupId>com.diffplug.spotless</groupId>
    <artifactId>spotless-maven-plugin</artifactId>
    <version>2.4.2</version>
    <configuration>
    <java>
    <googleJavaFormat>
    <version>1.7</version>
    <style>AOSP</style>
    </googleJavaFormat>

    <!-- \# refers to the static imports -->
    <importOrder>
    <order>com.dtstack,org.apache.flink,org.apache.flink.shaded,,javax,java,scala,\#</order>
    </importOrder>

    <removeUnusedImports/>
    </java>
    </configuration>
    <executions>
    <execution>
    <id>spotless-check</id>
    <phase>validate</phase>
    <goals>
    <goal>check</goal>
    </goals>
    </execution>
    </executions>
    </plugin>