Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: clarification

...

Here's an example of using an Ant task to run native2ascii.
Put the following fragment in your <build><plugins> section.
This snippet will run native2ascii on all files named *.utf8, starting from /src/test/resources and downwards. Processed files will be named to their original names, without the .utf8 extension. So, if you have /src/test/resources/UIMessages_iw_IL.properties.utf8, running this snippet will result in an additional, escaped unicode file named /src/test/resources/UIMessages_iw_IL.properties . Run this snippet with mvn compile .

Code Block
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-antrun-plugin</artifactId>
 <executions>
  <execution>
   <id>compile</id>
   <phase>compile</phase>
   <configuration>
    <tasks>
     <native2ascii
       encoding="UTF-8"
       dest="src/test/resources"
       src="src/test/resources"
       includes="*/.utf8" ext="" />
    </tasks>
   </configuration>
   <goals>
    <goal>run</goal>
   </goals>
  </execution>
 </executions>
 <dependencies>
  <dependency>
   <groupId>ant</groupId>
   <artifactId>ant-nodeps</artifactId>
   <version>1.6.5</version>
  </dependency>
  <dependency>
   <groupId>com.sun</groupId>
   <artifactId>tools</artifactId>
   <version>1.5.0</version>
   <scope>system</scope>
   <systemPath>${java.home}/../lib/tools.jar</systemPath>
  </dependency>
 </dependencies>
</plugin>