有没有办法通过谷歌排序 pom 插件或任何其他插件在每个依赖项之间添加新行。
当前 POM,通过 google sort pom 插件排序
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-core</artifactId>
<version>1.4.10</version>
</dependency>
我正在努力实现
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-core</artifactId>
<version>1.4.10</version>
</dependency>
我当前的 pom 插件
<plugin>
<groupId>com.google.code.sortpom</groupId>
<artifactId>maven-sortpom-plugin</artifactId>
<version>${com.google.code.sortpom}</version>
<configuration>
<predefinedSortOrder>custom_1</predefinedSortOrder>
<sortDependencies>groupId,artifactId</sortDependencies>
<sortPlugins>groupId,artifactId</sortPlugins>
<sortProperties>false</sortProperties>
<createBackupFile>false</createBackupFile>
<lineSeparator>\r\n</lineSeparator>
<expandEmptyElements>false</expandEmptyElements>
<keepBlankLines>true</keepBlankLines>
<nrOfIndentSpace>-1</nrOfIndentSpace>
<verifyFail>Warn</verifyFail>
</configuration>
<executions>
<execution>
<goals>
<goal>sort</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>