Flávio Casas de Arcega created MRESOURCES-240:
-------------------------------------------------

             Summary: Add some binnary types to nonFilteredFileExte‌​nsion by 
default
                 Key: MRESOURCES-240
                 URL: https://issues.apache.org/jira/browse/MRESOURCES-240
             Project: Maven Resources Plugin
          Issue Type: Improvement
          Components: filtering
            Reporter: Flávio Casas de Arcega
            Priority: Minor


Hi!

I had problems with filtering binnary resources, fonts and icons from my 
application where corrupted during the build process.

To solve, I added this configuration to the maven-resources-plugin:
<pluginManagement>
        <plugins>
                <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <configuration>
                                <nonFilteredFileExtensions>
                                        
<nonFilteredFileExtension>svg</nonFilteredFileExtension>
                                        
<nonFilteredFileExtension>woff</nonFilteredFileExtension>
                                        
<nonFilteredFileExtension>woff2</nonFilteredFileExtension>
                                        
<nonFilteredFileExtension>ttf</nonFilteredFileExtension>
                                        
<nonFilteredFileExtension>eot</nonFilteredFileExtension>
                                        
<nonFilteredFileExtension>otf</nonFilteredFileExtension>
                                </nonFilteredFileExtensions>
                        </configuration>
                </plugin>
        </plugins>
</pluginManagement>

And I was wondering if this binnary types coudn't be excluded from filters by 
default.

I think It would be possible, changing the 
org.apache.maven.shared.maven-filtering plugin by applying this patch to the 
org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering class:

79a80,85
>         this.defaultNonFilteredFileExtensions.add( "svg" );
>         this.defaultNonFilteredFileExtensions.add( "woff" );
>         this.defaultNonFilteredFileExtensions.add( "woff2" );
>         this.defaultNonFilteredFileExtensions.add( "ttf" );
>         this.defaultNonFilteredFileExtensions.add( "eot" );
>         this.defaultNonFilteredFileExtensions.add( "otf" );

Only a suggestion, thanks 4 all...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to