Maven

Toggle view

Maven2 site encoding problems

I have always had problems with Maven2 and localized project web sites resulting in incorrect display of special characters (like german umlaut etc.). There are many posts regarding this with none really providing solutions.

Today I did a retry and set up a project site driven by apt documents and a site.xml containing special characters. Here is what I think made it working:

  1. Set the IDE encoding to UTF-8
  2. All site documents (including site.xml) are UTF-8 encoded.
  3. Configure the maven-site-plugin to accept and produce UTF-8
  4. Set the system property file.encoding (e.g. set MAVEN_OPTS=-Dfile.encoding=UTF-8) before calling the mvn command

  maven-site-plugin
  2.0-SNAPSHOT
  
    en
utf-8
    utf-8
  

Still I’m struggling with the translations of the menu items provided by the maven-site-plugin which are still not ok! But I’m confident to solve this soon.

green red blue grey