snippetjavaCritical
How can I configure encoding in Maven?
Viewed 0 times
mavenhowencodingcanconfigure
Problem
When I run
So, I googled around a bit, but all I could find was that I have to add:
...to my pom.xml file. But it's already there (in the parent pom.xml).
Configuring `` for the maven-resources-plugin or the maven-compiler-plugin also doesn't fix it.
So what's the problem?
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 could find was that I have to add:
UTF-8
...to my pom.xml file. But it's already there (in the parent pom.xml).
Configuring `` for the maven-resources-plugin or the maven-compiler-plugin also doesn't fix it.
So what's the problem?
Solution
OK, I have found the problem.
I use some reporting plugins. In the documentation of the
UTF-8
UTF-8
`
See also How do I prevent "[WARNING] Using platform encoding (CP-1252 actually) to copy filtered resources, i.e. build is platform dependent!".
I use some reporting plugins. In the documentation of the
failsafe-maven-plugin I found, that the ` configuration - of course - uses ${project.reporting.outputEncoding} by default.
So I added the property as a child element of the project element and everything is fine now:
UTF-8
UTF-8
`
See also How do I prevent "[WARNING] Using platform encoding (CP-1252 actually) to copy filtered resources, i.e. build is platform dependent!".
Context
Stack Overflow Q#3017695, score: 781
Revisions (0)
No revisions yet.