Skip to content

Commit

Permalink
Support spotless
Browse files Browse the repository at this point in the history
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
  • Loading branch information
CrazyHZM committed Nov 6, 2023
1 parent 2aca2e3 commit 5f793d6
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 1 deletion.
60 changes: 59 additions & 1 deletion dubbo-build-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,64 @@

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<spotless-maven-plugin.version>2.39.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
</properties>

</project>
<profiles>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat />
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
55 changes: 55 additions & 0 deletions dubbo-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<portlet_version>2.0</portlet_version>
<maven_flatten_version>1.5.0</maven_flatten_version>
<commons_compress_version>1.23.0</commons_compress_version>
<spotless-maven-plugin.version>2.39.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<revision>3.2.8-SNAPSHOT</revision>
</properties>

Expand Down Expand Up @@ -951,6 +954,58 @@
</plugins>
</build>
</profile>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat />
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
55 changes: 55 additions & 0 deletions dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<maven_flatten_version>1.5.0</maven_flatten_version>
<curator5_version>5.1.0</curator5_version>
<zookeeper_version>3.8.1</zookeeper_version>
<spotless-maven-plugin.version>2.39.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -164,5 +167,57 @@
</plugins>
</build>
</profile>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat />
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
55 changes: 55 additions & 0 deletions dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<maven_flatten_version>1.5.0</maven_flatten_version>
<curator_version>4.3.0</curator_version>
<zookeeper_version>3.4.14</zookeeper_version>
<spotless-maven-plugin.version>2.39.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -101,5 +104,57 @@
</plugins>
</build>
</profile>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat />
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
61 changes: 61 additions & 0 deletions dubbo-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
<module>dubbo-dependencies-zookeeper-curator5</module>
</modules>

<properties>
<spotless-maven-plugin.version>2.39.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
</properties>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -61,4 +67,59 @@
</plugins>
</build>

<profiles>
<profile>
<id>java11+</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<!--- newer versions of plugins requires JDK 11 -->
<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat />
<removeUnusedImports />
<importOrder>
<file>dubbo-importorder.txt</file>
</importOrder>
<licenseHeader>
<file>checkstyle-header.txt</file>
</licenseHeader>
</java>
<pom>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
</sortPom>
</pom>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
</configuration>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo-shared-resources</artifactId>
<version>${dubbo-shared-resources.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>${spotless.action}</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit 5f793d6

Please sign in to comment.