Alex Rivera | Logout

How to make maven build platform independent?

Asked 2012-04-26T14:45:24.820
106

When building using Maven on my mac, on mvn install i get

[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!

Is it possible to either build for a given platform (Linux) or otherwise make build platform independent?

Edit
Report

1 Answer

193

It happens when you have not provided following in your pom.xml

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

Absence of this means you are using platform specific encoding and that's why the warning.

answered 2012-04-26T14:50:13.273

Your Answer