наконец-то понял.Использовал maven-replacer-plugin
и заменил регулярное выражение <new line><hash><any set of characters>
, то есть \r\n#(.*)
на <blank>
Обновление : чтобы можно было выполнить это на jenkins (экземпляр linux, вмой случай), добавили шаблон \n#(.*)
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.2</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<include>target/**/*.properties</include>
</includes>
<commentsEnabled>false</commentsEnabled>
<regex>true</regex>
<replacements>
<replacement>
<token>\r\n#(.*)</token>
<value></value>
</replacement>
<!-- Following line was added in update(linux compatible) -->
<replacement>
<token>\n#(.*)</token>
<value></value>
</replacement>
</replacements>
</configuration>
</plugin>