commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Sadowski <gil...@harfang.homelinux.org>
Subject [All] Re: UTF-8 encoding of Javadoc
Date Fri, 16 Nov 2012 16:36:24 GMT
Hi.

> I think I've spotted the reason why the javadoc does not come out right
> with UTF-8 characters.
> Our pom.xml defines the following properties
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> 
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> which should produce the correct result if the default configuration of the
> javadoc plugin is used [1].
> 
> However, the parent pom.xml does not use the javadoc plugin default config.
> Instead, it uses two properties, namely commons.encoding and
> commons.docEncoding
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-javadoc-plugin</artifactId>
>           ...
>           <configuration>
>             ...
>             <encoding>${commons.encoding}</encoding>
>             <docEncoding>${commons.docEncoding}</docEncoding>
>             ...
>           </configuration>
>         </plugin>
> 
> which are defined as follows
>     <commons.encoding>iso-8859-1</commons.encoding>
>     <commons.docEncoding>${commons.encoding}</commons.docEncoding>

I'd think that this should be changed here.

Gilles

> 
> So, we should first override commons.encoding in our own pom.xml
>     <commons.encoding>UTF-8</commons.encoding>
> 
> We should also get rid of the following lines in our pom.xml
>     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> 
> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
> 
> since the parent pom.xml defines these two properties as
> 
> <project.build.sourceEncoding>${commons.encoding}</project.build.sourceEncoding>
> 
> <project.reporting.outputEncoding>${commons.encoding}</project.reporting.outputEncoding>
> 
> 
> I've performed these changes locally, and it seems to be working OK.
> However, I'm a bit shy. I'm no maven guru, and I'd rather someone had a
> look into this before I commit the changes.
> 
> Best regards,
> S├ębastien
> 
> [1]
> http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#What_are_the_values_of_encoding_docencoding_and_charset_parameters

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message