views:

11

answers:

1

Hi, I want to have the encoding of my project's file to be set to UTF-8.

Following maven FAQ answer, I set the project.build.sourceEncoding property to UTF-8. unfortunatly, it has no effect.

Then, by looking at a m2eclipse JIRA, I tried a workaround by defining compiler plugin sourceEncoding, but it neither worked, as I try to do that in a separate module parent pom.

Then, what is the solution to ensure my files are all in UTF-8 from maven ?

Thanks.

A: 

Define Eclipse project encoding as UTF-8 from Maven

I don't know if you saw MNGECLIPSE-1782 but this is currently not supported, m2eclipse doesn't derive the project encoding from your POM. You'll have to set up the encoding manually under Eclipse (which can be done globally for the workspace via Preferences > General > Workspace).

Pascal Thivent
So there absolutely no workaround except the tedious manual process of setting file encoding on each Eclipse workspace where one have to work ?
Riduidel
@Riduidel: Well, the above Jira issue does mention a workaround: *"writing an extension for org.maven.ide.eclipse.projectConfigurators extension point"*.
Pascal Thivent