|
144 | 144 |
|
145 | 145 | <build>
|
146 | 146 | <plugins>
|
| 147 | + <plugin> |
| 148 | + <groupId>io.spring.javaformat</groupId> |
| 149 | + <artifactId>spring-javaformat-maven-plugin</artifactId> |
| 150 | + <executions> |
| 151 | + <execution> |
| 152 | + <goals> |
| 153 | + <goal>validate</goal> |
| 154 | + </goals> |
| 155 | + <phase>validate</phase> |
| 156 | + </execution> |
| 157 | + </executions> |
| 158 | + </plugin> |
147 | 159 | <plugin>
|
148 | 160 | <groupId>org.apache.maven.plugins</groupId>
|
149 | 161 | <artifactId>maven-compiler-plugin</artifactId>
|
|
177 | 189 | <target>${maven.compiler.target}</target>
|
178 | 190 | </configuration>
|
179 | 191 | </plugin>
|
| 192 | + <!-- 测试插件 --> |
| 193 | + <plugin> |
| 194 | + <groupId>org.apache.maven.plugins</groupId> |
| 195 | + <artifactId>maven-surefire-plugin</artifactId> |
| 196 | + <configuration> |
| 197 | + <argLine>-Dfile.encoding=UTF-8</argLine> |
| 198 | + </configuration> |
| 199 | + </plugin> |
| 200 | + <plugin> |
| 201 | + <groupId>org.codehaus.mojo</groupId> |
| 202 | + <artifactId>flatten-maven-plugin</artifactId> |
| 203 | + <configuration> |
| 204 | + <flattenMode>resolveCiFriendliesOnly</flattenMode> |
| 205 | + <updatePomFile>true</updatePomFile> |
| 206 | + </configuration> |
| 207 | + <executions> |
| 208 | + <execution> |
| 209 | + <goals> |
| 210 | + <goal>flatten</goal> |
| 211 | + </goals> |
| 212 | + <id>flatten</id> |
| 213 | + <phase>process-resources</phase> |
| 214 | + </execution> |
| 215 | + <execution> |
| 216 | + <goals> |
| 217 | + <goal>clean</goal> |
| 218 | + </goals> |
| 219 | + <id>flatten.clean</id> |
| 220 | + <phase>clean</phase> |
| 221 | + </execution> |
| 222 | + </executions> |
| 223 | + </plugin> |
| 224 | + <!-- git hook 配置 --> |
| 225 | + <plugin> |
| 226 | + <groupId>com.rudikershaw.gitbuildhook</groupId> |
| 227 | + <artifactId>git-build-hook-maven-plugin</artifactId> |
| 228 | + <configuration> |
| 229 | + <gitConfig> |
| 230 | + <!-- The location of the directory you are using to store the Git hooks in your project. --> |
| 231 | + <core.hooksPath>.etc/git-hooks/</core.hooksPath> |
| 232 | + </gitConfig> |
| 233 | + </configuration> |
| 234 | + <executions> |
| 235 | + <execution> |
| 236 | + <goals> |
| 237 | + <!-- Sets git config specified under configuration > gitConfig. --> |
| 238 | + <goal>configure</goal> |
| 239 | + </goals> |
| 240 | + </execution> |
| 241 | + </executions> |
| 242 | + </plugin> |
| 243 | + <!-- checkstyle 配置 --> |
| 244 | + <plugin> |
| 245 | + <groupId>org.apache.maven.plugins</groupId> |
| 246 | + <artifactId>maven-checkstyle-plugin</artifactId> |
| 247 | + <executions> |
| 248 | + <execution> |
| 249 | + <id>checkstyle-validation</id> |
| 250 | + <phase>validate</phase> |
| 251 | + <configuration> |
| 252 | + <configLocation>src/checkstyle/checkstyle.xml</configLocation> |
| 253 | + <suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation> |
| 254 | + <consoleOutput>true</consoleOutput> |
| 255 | + <failsOnError>true</failsOnError> |
| 256 | + <includeTestSourceDirectory>true</includeTestSourceDirectory> |
| 257 | + </configuration> |
| 258 | + <goals> |
| 259 | + <goal>check</goal> |
| 260 | + </goals> |
| 261 | + </execution> |
| 262 | + </executions> |
| 263 | + </plugin> |
180 | 264 | </plugins>
|
181 | 265 | </build>
|
182 | 266 | <developers>
|
|
0 commit comments