Skip to content

Commit

Permalink
⚡ Commit content:
Browse files Browse the repository at this point in the history
- 增加格式化 Maven 插件以及更新文档
  • Loading branch information
tonycody committed Oct 26, 2023
1 parent 9ee1fd6 commit bdcc59d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ X File Storage 的源码分为两个分支,功能如下:
5. 登录 Gitee 或 Github 在你首页可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可
6. 等待维护者合并

#### 🧬 开发约定 & 配置
1. JDK 11+、Maven 3.8.1+
2. 代码风格,目前代码风格通过 spotless-maven-plugin + palantir-java-format 统一控制,Maven 构建时统一格式化代码
3. 在开发阶段,IDE 要识别到 spotless-maven-plugin + palantir-java-format 需要安装插件:[palantir-java-format](https://plugins.jetbrains.com/plugin/13180-palantir-java-format)

#### 📐PR遵照的原则

欢迎任何人为 X File Storage 添砖加瓦,贡献代码,为了易用性和可维护性,需要提交的 pr(pull request)符合一些规范,规范如下:
Expand Down
35 changes: 33 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
<maven-enforcer-plugin.version>3.3.0</maven-enforcer-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<spotless-maven-plugin.version>2.40.0</spotless-maven-plugin.version>
<palantir-java-format.version>2.38.0</palantir-java-format.version>
<!--endregion-->
</properties>

Expand Down Expand Up @@ -274,10 +276,10 @@
<configuration>
<rules>
<requireJavaVersion>
<version>${java.version}</version>
<version>[11,)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>${maven.version}</version>
<version>[${maven.version},)</version>
</requireMavenVersion>
</rules>
</configuration>
Expand Down Expand Up @@ -310,6 +312,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<palantirJavaFormat>
<version>${palantir-java-format.version}</version>
</palantirJavaFormat>
</java>
</configuration>
<executions>
<execution>
<goals>
<goal>apply</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
Expand All @@ -336,6 +358,15 @@
</build>

<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>${java.version}</maven.compiler.release>
</properties>
</profile>
<profile>
<id>test</id>
<modules>
Expand Down
4 changes: 4 additions & 0 deletions x-file-storage-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- WebDAV -->
Expand Down

0 comments on commit bdcc59d

Please sign in to comment.