Skip to content

[MRESOURCES-281] allow different encodings for files inside the same resource-directory #125

Description

@jira-importer

Carsten Rohde opened MRESOURCES-281 and commented

Currently each resource-directory has a single encoding, with the recent exception of properties (MRESOURCES-171).

If you need to filter differently encoded files, this can become quite a hazzle: The only way (at least that I'm aware of) is to have different modules or non-resource directories as the source for copy-resources. Apart from bloating the pom, it also forces you to have related files at different locations if they are encoded differently.

 

What I'm suggesting is to generalize what has been done for properties by allowing to override the <encoding> for specific files/patterns.

Ideally this would be part of the resource-declaration but being able to configure the resources plugin accordingly would already help a lot:

<configuration>
   <encodingOverrides>
       <encodingOverride>
          <encoding>UTF-16</encoding>
          <includes>**/*.myfile</includes>
       </encodingOverride>
       <encodingOverride>
           <encoding>iso-latin-1</encoding>
           <includes>**/*.other</includes>
       </encodingOverride>
   </encodingOverrides>
</configuration>

What do you think?

Affects: 3.2.0

Issue Links:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions