mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
google 代码格式化
This commit is contained in:
91
pom.xml
91
pom.xml
@@ -15,67 +15,10 @@
|
||||
<description>coal</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<git-code-format-maven-plugin.version>4.2</git-code-format-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>build</id>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun</id>
|
||||
<url>http://192.168.0.118:8081/repository/maven-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<releases>
|
||||
<updatePolicy>never</updatePolicy>
|
||||
<enabled>false</enabled>
|
||||
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<releases>
|
||||
<updatePolicy>never</updatePolicy>
|
||||
<enabled>false</enabled>
|
||||
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
<url>https://repo.maven.apache.org/maven2</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>aliyun</id>
|
||||
<url>http://192.168.0.118:8081/repository/maven-public/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
<repositories>
|
||||
|
||||
@@ -382,6 +325,38 @@
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>com.cosium.code</groupId>
|
||||
<artifactId>git-code-format-maven-plugin</artifactId>
|
||||
<version>${git-code-format-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<!-- On commit, format the modified files -->
|
||||
<execution>
|
||||
<id>install-formatter-hook</id>
|
||||
<goals>
|
||||
<goal>install-hooks</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<!-- On Maven verify phase, fail if any file
|
||||
(including unmodified) is badly formatted -->
|
||||
<execution>
|
||||
<id>validate-code-format</id>
|
||||
<goals>
|
||||
<goal>validate-code-format</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<!-- Enable https://github.com/google/google-java-format -->
|
||||
<dependency>
|
||||
<groupId>com.cosium.code</groupId>
|
||||
<artifactId>google-java-format</artifactId>
|
||||
<version>${git-code-format-maven-plugin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user