views:

110

answers:

1

When I run maven install on my multi module maven project I always get the following output:

[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!

So, I googled around a bit, but all I can find is that I have to add

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

to my pom.xml. But it's already there (in the parent pom.xml).

Configuring <encoding> for the maven-resources-plugin or the maven-compiler-plugin also doesn't fix it. So what's the problem?

+1  A: 

OK, I found the problem.

I use some reporting plugins. In the documentation of the failsafe-maven-plugin (http://maven.apache.org/plugins/maven-failsafe-plugin/integration-test-mojo.html) I found, that the <encoding> configuration - of course - uses ${project.reporting.outputEncoding} by default. So I added the property and everything is fine now:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8<project.reporting.outputEncoding>
</properties>
Ethan Leroy