Encoding issue in property file when the ear is built using Jenkins

242 views Asked by At

My project uses 2 property file based on the locale message.properties and message_de.properties. The German property file contains umlaut. The issue is that when I use Jenkins to deploy the ear in JBoss server, the message_de.properties is not encoded properly. But when I manually generate an ear in Windows and then copy to the server(linux machine), this issue is not found. Please note I have used ISO-8859-1 for encoding.

1

There are 1 answers

0
user1372469 On BEST ANSWER

The encoding issue of umlauts was occurring when the code was deployed through Jenkins. I have resolved it by setting the below value in Jenkins environment property JAVA_TOOL_OPTIONS=-Dfile.encoding=ISO-8859-1

The following link gives an example on how to set the environment property in Jenkins https://www.linkedin.com/pulse/how-resolve-utf-8-encoding-issue-jenkins-ajuram-salim