Maven causes problem with special characters for ISO-8859-1 files

Asked

Viewed 555 times

1

I have a fully configured Eclipse project and my files. java uses ISO-8859-1 encoding and some other Resource files use UTF-8 encoding.

I need to create an archetype from this project.

I’ve tried anyway and I can’t get Maven to create my archetype with the right encoding. No matter what I do, files are always copied to the archetype with the UTF-8 encoding.

I’ve tried to:

Configure the POM.xml

        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
    <project.reporting.outputEncoding>ISO-8859-1</project.reporting.outputEncoding>

Pass these parameters on the command line

mvn archetype:create-from-project -Dproject.build.sourceEncoding=ISO-8859-1 -Dproject.reporting.outputEncoding=ISO-8859-1

And nothing works.

Any help will be welcome.

1 answer

1

After searching for all possible parameters, I found the answer:

mvn archetype:create-from-project -Darchetype.encoding=ISO-8859-1

It worked for me!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.