You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alex Milanovic <al...@iogeo.com> on 2008/12/18 13:00:13 UTC

resources with different encodings

Hi All,

I have a mix of resources in UTF-8 (XML files) and ISO-8859-1 (properties
files). The resource encoding can be configured only on the level of the
entire resource plugin, but I need to be able to specify the encoding per
resource. Is this possible?

Thanks,
Alex

Re: resources with different encodings

Posted by Alex Milanovic <al...@iogeo.com>.
Doesn't work. A resource cannot specify the encoding, only the
resource plugin can. I've googled this but haven't found anything
useful. Strangely, I haven't had any problems with the
encoding-unaware setup even though in theory I should have had
problems. I have XML files in UTF-8 and Java property files are by
default in ISO-8859-1. Some of these files have accented letters that
typically cause lots of problems. I thought I should configure Maven
to copy the two sets of resources using their respective encodings to
avoid any potential problems in the future, but I haven't discovered a
way (if it exists). I am actually a bit surprised that such a basic
thing is not built into Maven. I would expect to be able to specify
the encoding per resource.

Cheers,
Alex

On Tue, Dec 30, 2008 at 4:04 AM, Wayne Fay <wa...@gmail.com> wrote:
>
> > Ok, I defined two different executions of the resource plugin, gave them
> > different IDs but how can I control which one is executed for each
> > individual resource? They should be executed in the same phase and for the
> > same goal.
>
> You'd need to create:
> /src/main/resources/utf8
> /src/main/resources/iso88591
>
> And then configure each instance pointing to the proper directory...
> or something along those lines.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: resources with different encodings

Posted by Wayne Fay <wa...@gmail.com>.
> Ok, I defined two different executions of the resource plugin, gave them
> different IDs but how can I control which one is executed for each
> individual resource? They should be executed in the same phase and for the
> same goal.

You'd need to create:
/src/main/resources/utf8
/src/main/resources/iso88591

And then configure each instance pointing to the proper directory...
or something along those lines.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: resources with different encodings

Posted by Alex Milanovic <al...@iogeo.com>.
Ok, I defined two different executions of the resource plugin, gave them
different IDs but how can I control which one is executed for each
individual resource? They should be executed in the same phase and for the
same goal.

Alex

On Thu, Dec 18, 2008 at 3:36 PM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> You'd need multiple executions of the resource plugin, but it can be done
>
> 2008/12/18 Alex Milanovic <al...@iogeo.com>
>
> > Hi All,
> >
> > I have a mix of resources in UTF-8 (XML files) and ISO-8859-1 (properties
> > files). The resource encoding can be configured only on the level of the
> > entire resource plugin, but I need to be able to specify the encoding per
> > resource. Is this possible?
> >
> > Thanks,
> > Alex
> >
>

Re: resources with different encodings

Posted by Stephen Connolly <st...@gmail.com>.
You'd need multiple executions of the resource plugin, but it can be done

2008/12/18 Alex Milanovic <al...@iogeo.com>

> Hi All,
>
> I have a mix of resources in UTF-8 (XML files) and ISO-8859-1 (properties
> files). The resource encoding can be configured only on the level of the
> entire resource plugin, but I need to be able to specify the encoding per
> resource. Is this possible?
>
> Thanks,
> Alex
>