By default Maven uses the operating system platform encoding for the build. On OSX this is MacRoman. This leads to warnings that the build is platform dependent:
$ mvn clean package [INFO] Scanning for projects... [WARNING] File encoding has not been set, using platform encoding MacRoman, i.e. build is platform dependent!
To fix this you just have to add the following profile to your ~/.m2/setting.xml:
utf8 UTF-8 UTF-8
The activate the utf8 profile with:
When you successfully added the profile you get this fancy info message in your maven builds:
[INFO] Using 'UTF-8' encoding to copy filtered resources.