ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as2 <agent59624...@spamcorptastic.com>
Subject RE: native2ascii in build.xml
Date Tue, 07 Jul 2009 11:39:13 GMT

An example how to use the nativ2ascii-ant-task:

    <target name="copy_resources" depends="compile">
       <!-- copies all non-java-files (especially class and
ApplicationResources) to targetdir -->
        <copy todir="${targetdir}">
            <fileset dir="${sourcedir}">
                <exclude name="**/*.java"/>
            </fileset>
        </copy>
    	<!-- This converts the human-readable utf8 into java-readable UTF8 -->
    	<native2ascii encoding="UTF-8" src="${targetdir}" dest="${targetdir}"
    	    	   includes="**/*.properties_src" ext=".properties" />
    	 <delete>
    	    <fileset dir="${targetdir}" includes="**/*.properties_src"/>
    	  </delete>

     </target>

Name your ApplicationResource-files ApplicationResources.properties_src in
your source-directory.

1. properties_src-files get copied to target-directory
2. native2ascii converts them and renames the extension to ".properties"
3. unneeded properties_src are deleted from target-directory


-- 
View this message in context: http://www.nabble.com/native2ascii--in-build.xml-tp17818914p24371730.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message