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

1

I have a fully configured Eclipse project and my .java files use 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 it anyway and I can not get Maven to create my archetype with the correct encoding. No matter what I do, the files are always copied to the archetype with UTF-8 encoding.

I've tried:

Configuring 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.

    
asked by anonymous 07.11.2016 / 18:37

1 answer

1

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

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

It worked for me!

    
07.11.2016 / 20:12