Maven 通过google sort pom插件在依赖项之间添加新行
有没有办法通过google sort pom插件或任何其他插件在每个依赖项之间添加新行 当前POM,通过google sort POM插件排序Maven 通过google sort pom插件在依赖项之间添加新行,maven,maven-3,Maven,Maven 3,有没有办法通过google sort pom插件或任何其他插件在每个依赖项之间添加新行 当前POM,通过google sort POM插件排序 <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.8.5</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>
<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>
org.mockito
莫基托所有
1.8.5
org.powermock
powermock内核
1.4.10
我正在努力实现这个目标
<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>
org.mockito
莫基托所有
1.8.5
org.powermock
powermock内核
1.4.10
我当前的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>
<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>
com.google.code.sortpom
maven sortpom插件
${com.google.code.sortpom}
海关1
groupId,artifactId
groupId,artifactId
假的
假的
\r\n
假的
真的
-1
警告
分类
编译
它只是一个XML文件
只需使用IDE的内置XML格式化程序,按照您的意愿格式化
pom.XML
文件即可。Eclipse和Intellij IDEA都有XML文件的格式化程序。目前,maven Sortcom插件没有在依赖项之间插入空行的自动方法
但是,如果在两个现有依赖项之间有一个空行,那么在排序过程中插件将不会删除该行,因为您在eclipse中使用了配置选项
true
,我无法找出执行此操作的部分。这里是我的位置窗口->首选项->XML->XML文件->编辑器