Skip to content

Commit d13e380

Browse files
committed
OF-2889: i18n properties: don't convert from UTF-8 to Latin1
Revert: OF-1517: Don't require encoded i18n files for plugins 8a48cb8
1 parent 21a962c commit d13e380

File tree

3 files changed

+5
-89
lines changed

3 files changed

+5
-89
lines changed

i18n/pom.xml

-31
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,4 @@
1313
<!-- Use static build timestamp for reproducible builds -->
1414
<project.build.outputTimestamp>1980-02-01T00:00:00Z</project.build.outputTimestamp>
1515
</properties>
16-
<build>
17-
<resources>
18-
<resource>
19-
<directory>src/main/resources</directory>
20-
</resource>
21-
</resources>
22-
23-
<plugins>
24-
<plugin>
25-
<!--
26-
Java has trouble reading translations from UTF-8 files. To work around that,
27-
this plugin ensures that Java-compatible encoding is used.
28-
See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
29-
-->
30-
<groupId>org.codehaus.mojo</groupId>
31-
<artifactId>native2ascii-maven-plugin</artifactId>
32-
<version>2.0.1</version>
33-
<executions>
34-
<execution>
35-
<id>utf8-to-latin1</id>
36-
<goals>
37-
<goal>inplace</goal>
38-
</goals>
39-
<configuration>
40-
<dir>${project.build.outputDirectory}</dir>
41-
</configuration>
42-
</execution>
43-
</executions>
44-
</plugin>
45-
</plugins>
46-
</build>
4716
</project>

plugins/openfire-plugin-assembly-descriptor/src/main/resources/assemblies/openfire-plugin-assembly.xml

+5-11
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,32 @@
4444
</includes>
4545
</fileSet>
4646

47-
<!-- database and web directory -->
47+
<!-- database, i18n and web directory -->
4848
<fileSet>
4949
<outputDirectory/>
5050
<directory>${project.build.sourceDirectory}/..</directory>
5151
<includes>
5252
<include>database/**</include>
53+
<include>i18n/**</include>
5354
<include>web/**</include>
5455
</includes>
5556
<!-- Exclude jsp pages (they will be compiled) and filterable resources -->
5657
<excludes>
5758
<exclude>**/*.jsp</exclude>
59+
<exclude>i18n/**/*.properties</exclude>
5860
<exclude>web/**/*.xml</exclude>
5961
<exclude>web/**/*.html</exclude>
6062
<exclude>web/**/*.properties</exclude>
6163
</excludes>
6264
</fileSet>
6365

64-
<!-- database and web directory (filtered) -->
66+
<!-- database, i18n and web directory (filtered) -->
6567
<fileSet>
6668
<outputDirectory/>
6769
<directory>${project.build.sourceDirectory}/..</directory>
6870
<filtered>true</filtered>
6971
<includes>
72+
<include>i18n/**/*.properties</include>
7073
<include>web/**/*.xml</include>
7174
<include>web/**/*.html</include>
7275
<include>web/**/*.properties</include>
@@ -77,15 +80,6 @@
7780
</excludes>
7881
</fileSet>
7982

80-
<!-- i18n -->
81-
<fileSet>
82-
<outputDirectory>i18n</outputDirectory>
83-
<directory>${project.build.directory}/i18n/</directory>
84-
<includes>
85-
<include>*.properties</include>
86-
</includes>
87-
</fileSet>
88-
8983
<!-- web.xml (it will be modified by JspC) -->
9084
<fileSet>
9185
<outputDirectory>web/WEB-INF</outputDirectory>

plugins/pom.xml

-47
Original file line numberDiff line numberDiff line change
@@ -184,53 +184,6 @@
184184
<groupId>org.apache.maven.plugins</groupId>
185185
<artifactId>maven-compiler-plugin</artifactId>
186186
</plugin>
187-
<plugin>
188-
<!--
189-
Java has trouble reading translations from UTF-8 files. To work around that,
190-
this plugin copies the i18n files from source to the build directory, to be
191-
modified later by the native2ascii-maven-plugin.
192-
-->
193-
<artifactId>maven-resources-plugin</artifactId>
194-
<version>3.1.0</version>
195-
<executions>
196-
<execution>
197-
<phase>generate-resources</phase>
198-
<goals>
199-
<goal>copy-resources</goal>
200-
</goals>
201-
<configuration>
202-
<outputDirectory>${project.build.directory}/i18n/</outputDirectory>
203-
<resources>
204-
<resource>
205-
<directory>${project.build.sourceDirectory}/../i18n/</directory>
206-
<filtering>true</filtering>
207-
</resource>
208-
</resources>
209-
</configuration>
210-
</execution>
211-
</executions>
212-
</plugin>
213-
<plugin>
214-
<!--
215-
Java has trouble reading translations from UTF-8 files. To work around that,
216-
this plugin ensures that Java-compatible encoding is used.
217-
See https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle
218-
-->
219-
<groupId>org.codehaus.mojo</groupId>
220-
<artifactId>native2ascii-maven-plugin</artifactId>
221-
<version>2.0.1</version>
222-
<executions>
223-
<execution>
224-
<id>utf8-to-latin1</id>
225-
<goals>
226-
<goal>inplace</goal>
227-
</goals>
228-
<configuration>
229-
<dir>${project.build.directory}/i18n/</dir>
230-
</configuration>
231-
</execution>
232-
</executions>
233-
</plugin>
234187
<plugin>
235188
<groupId>org.apache.maven.plugins</groupId>
236189
<artifactId>maven-enforcer-plugin</artifactId>

0 commit comments

Comments
 (0)