有一种方法可以选择性地关闭(Java 代码的)Eclipse 格式化(参见 here)。
XML 文件的格式是否有等价物?
最佳答案
<token><![CDATA[..... Your line ....]]></token>
在 Eclispe 上,我在 pom.xml 中使用此解决方案
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<basedir>${basedir}</basedir>
<unescape>true</unescape>
<includes>
<include>src/test/resources/steps/scenarios/xxxxxx.feature</include>
</includes>
<token><![CDATA[Then home page is displayed[\\s\\S]*Then go to PRODUCTION]]></token>
<value><![CDATA[Then home page is displayed\n\n ##patch for IC\n Then I change CP\n ##end patch for IC\n\n Then go to PRODUCTION]]></value>
</configuration>
</plugin>
https://stackoverflow.com/questions/6778795/