开发者

maven resources plugin has issues with filtering if there are odd number of '@' present in the filtered file

开发者 https://www.devze.com 2023-04-06 04:46 出处:网络
The maven resources plugin has issues with handling \'@\' characters inside the files it needs to filter.

The maven resources plugin has issues with handling '@' characters inside the files it needs to filter.

Here is the JIRA related to the same

  • http://ji开发者_StackOverflowra.codehaus.org/browse/MRESOURCES-104
  • http://jira.codehaus.org/browse/MRESOURCES-129

The issue is that the only workaround mentioned here is to use

${*}

and that does not seem to work for me.

I have the following configuration:

Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530) Maven home: /proj/tools/apache-maven-3.0.3 Java version: 1.6.0_24, vendor: Sun Microsystems Inc. Java home: /usr/local/java/jdk1.6.0.24/jre Default locale: en, platform encoding: ISO646-US OS name: "sunos", version: "5.10", arch: "x86", family: "unix"

Has anyone faced a similar issue and resolved it?

Thanks


Ok I got the answer to this.

Not only do you need to mention the delimiters , but you also need to tell maven that it has to ignore the default delimiters the following is the configuration that started working for me.

<plugin>
<groupId>org.apache.mave.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
    <useDefaultDelimiters>false</useDefaultDelimiters>
    <delimiters>
        <delimiter>${*}</delimiter>
    </delimiters>
    <nonFilteredFileExtensions>
        <nonFilteredFileExtension>pdf</nonFilteredFileExtension>
        <nonFilteredFileExtension>swf</nonFilteredFileExtension>
        <nonFilteredFileExtension>jpeg</nonFilteredFileExtension>
        <nonFilteredFileExtension>jpg</nonFilteredFileExtension>
        <nonFilteredFileExtension>png</nonFilteredFileExtension>
    </nonFilteredFileExtensions>
</configuration>

This would to do job of making sure that the apache maven resources plugin knows that no default delimiters are to be used and in conjunction with that, the delimiters mentioned in the delimeter tag are to be used only.

0

精彩评论

暂无评论...
验证码 换一张
取 消