Child pages
  • v2.5.0 Migration Guide

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since v2.5.0 resource bundles must be loaded in UTF-8 encoding, this page is exactly to show how an existing module can be converted to use this version.

...

Upgrading dependencies versions

As this major update had a lot of changes it is required that you upgrade some of your project's versions.

...

Code Block
languagebash
themeEclipse
titleUpgrading dependencies versions
mvn -U versions:update-properties -Dincludes="pt.ist*,org.fenixedu*"  -Dexcludes=javax.: -DgenerateBackupPoms=false -Pproduction

UTF-8 Enforce

All-in-one operation

This is the faster way to apply all the required actions to enforce UTF-8 resource bundle properties.

This operation assumes that all you resource bundles are located in src/main/resources/resources

What this will do:

  • Convert every ISO-8859-1 encoded resource bundle properties file to UTF-8.
  • Add a comment containing emojis to enforce UTF-8 on every resource bundle properties file.
  • Enforce the use of UTF8PropertyMessageResourcesFactory on every existing struts config file.

How to do it:

Just download and run the script below passing your project's/module's path as a parameter to the script.

E.g. $script-path/utf8-enforce.sh $project-path

utf8-enforce.sh

Note:

If your resource bundles are placed in another location besides src/main/resources/resources please apply the changes below:

  1. Open the script on a text editor
  2. On line 3 change the text grep "^.*src/main/resources/resources$" to grep "^.*{your-resources-path}$"
  3. Replace the {your-resources-path} by your resources path

Step-by-step operation

This way is slower but more precise if you need to change some things to match your criteria.

Converting resource bundle properties to UTF-8

1. Run the script below to convert all ISO-8859-1 resource bundle properties to UTF-8, sending you project path as a parameter.

...

E.g. $script-path/apply-utf8-comments.sh $project-path

apply-utf8-comments.sh

Enforcing the use of UTF-8 resources factory on struts config files

1. Run the script below to enforce UTF8PropertyMessageResourcesFactory on every struts config file (struts-*.xml), sending you project path as a parameter.

...