Resources on Maven 2 and native2ascii
- http://www.jakubpawlowicz.com/blog/2006/03/19/maven_native2ascii_plugin/
- http://jroller.com/page/wakaleo?entry=maven_2_tip_using_tools
- http://www.nabble.com/Is-there-a-publicly-available-native2ascii-plugin-for-Maven-2--tf2897346s177.html
- http://issues.appfuse.org/browse/APF-561
Examples
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 .
<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>
