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

StackOverflow https://stackoverflow.com/questions/7499373

Question

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

Here is the JIRA related to the same

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top