(improvement)[build] Add the spotless.skip configuration to resolve the error reported by Spotless during the build. (#1762)

This commit is contained in:
lexluo09
2024-10-09 22:20:56 +08:00
committed by GitHub
parent 2c75a6972a
commit cadb743eda
3 changed files with 7 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ if "%service%"=="webapp" (
:buildJavaService
set "model_name=%service%"
echo "starting building supersonic-%model_name% service"
call mvn -f %projectDir% clean package -DskipTests
call mvn -f %projectDir% clean package -DskipTests -Dspotless.skip=true
IF ERRORLEVEL 1 (
ECHO Failed to build backend Java modules.
EXIT /B 1

View File

@@ -15,7 +15,7 @@ fi
function buildJavaService {
model_name=$1
echo "starting building supersonic-${model_name} service"
mvn -f $projectDir clean package -DskipTests
mvn -f $projectDir clean package -DskipTests -Dspotless.skip=true
if [ $? -ne 0 ]; then
echo "Failed to build backend Java modules."
exit 1

View File

@@ -76,6 +76,7 @@
<flight-sql-jdbc-driver.version>15.0.2</flight-sql-jdbc-driver.version>
<gson.version>2.10.1</gson.version>
<spotless.version>2.27.1</spotless.version>
<spotless.skip>false</spotless.skip>
<stax2.version>4.2.1</stax2.version>
</properties>
@@ -244,6 +245,7 @@
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<skip>${spotless.skip}</skip>
<java>
<eclipse>
<file>java-formatter.xml</file>
@@ -260,6 +262,9 @@
<goals>
<goal>apply</goal>
</goals>
<configuration>
<skip>${spotless.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>