Hi,

2012/11/16 Gilles Sadowski <gil...@harfang.homelinux.org>

> 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.
>
> What do you mean? In the parent pom? I think this is a radical change;
maybe not everyone is keen on using UTF-8 encoding.

The changes I propose (they must be validated by others more familiar with
maven) keep the spirit of our own pom, in which we override the default
encoding. Only, this default encoding is at the moment not correctly
overriden.

Best regards,

Sébastien

> 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-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to