Reputation: 836
I have En-Jp.properties
file for automating some test cases in Japanese locale, which has English words as key & Japanese words (ASCII) as value.
Something like this:
Login:\u30ed\u30b0\u30a4\u30f3
I first tried with Java's native2ascii
tool for 2-3 words of Japanese which is working fine. Now when this file is growing with n-number of key-value pair. I tried using native2ascii-maven-plugin
, configuring as described here.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<configuration>
<src>src/main/resources</src>
<dest>target/classes</dest>
</configuration>
<executions>
<execution>
<id>native2ascii-utf8</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>UTF8</encoding>
<includes>En-jp.properties</includes>
</configuration>
</execution>
</executions>
</plugin>
However, I am getting below error,
Unable to parse configuration of mojo
org.codehaus.mojo:native2ascii-maven-plugin:1.0-beta-1:native2ascii for parameter includes: Cannot assign configuration entry 'includes' with value 'En-jp.properties' of type java.lang.String to property of type java.lang.String[]
What is missing in pom.xml
? Is the version of plugin too old to work for this scenario? I am also doubtful if I am following right path (using Maven plugin) for getting ASCII value for entire properties file.
Upvotes: 3
Views: 1588
Reputation: 137209
The tag <includes>
should contain a list of element, not a single element. That means you need to add <include>
subtag to this tag.
It should be:
<includes>
<include>En-jp.properties</include>
</includes>
Upvotes: 2