Hey Alessio,
Those i18n profiles are used to test logging in the presence of a
non-default locale. In particular, the tests set a locale which brings
in message bundles from src/main/resources. Most of the time, the
bundles live in src/test/resources because they are purely for testing
and shouldn't ship in the jars. Notice the presence of
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/resources</directory>
<includes>
<include>org/**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
in Resteasy/pom.xml, which cleans up the bundles whenever mvn clean is
executed.
One other issue, by the way, is the fact that, as far as I can tell,
setting a default locale in a JVM can't be reversed. The i18n tests use
multiple default locales, e.g., "en" and "xx", to bring in different
message bundles, so they need separate JVMs. That's why the i18n
profiles set
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
<reuseForks/> to false.
These i18n profiles have been sitting there quietly for quite a while
now. They were added mostly to test that I did the i18n conversion
properly. Since then, there hasn't really been any reason to run them,
except, maybe every couple of years, we add a new log message. ;-)
Or, in Latin, mea culpa. Hope that helps.
-Ron
On 09/02/2016 12:15 PM, Alessio Soldano wrote:
Hi,
while fixing an issue with i18n messages in the Vert.x server adapter
(basically the same base id of Netty4 adapter was used, hence resulting
in id clashes), I stumbled upon the i18n maven profile that can be found
in many pom.xml files in the project. Can anybody please explain
how/when that is used?
In particular, when that profile is on, I find what the
maven-resources-plugin does a bit suspicious; see for example
https://github.com/resteasy/Resteasy/blob/5b4823ff60d73fdf48f7c0b70b2b4ee...
, files from the test tree are copied into the main tree (hence
potentially polluting the built artifacts).
Thanks
Alessio
--
My company's smarter than your company (unless you work for Red Hat)