[Schmitzm-commits] r609 - branches/1.0-gt2-2.6

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Dec 9 18:05:22 CET 2009


Author: alfonx
Date: 2009-12-09 18:05:21 +0100 (Wed, 09 Dec 2009)
New Revision: 609

Added:
   branches/1.0-gt2-2.6/ant-contrib-1.0b2.jar
Modified:
   branches/1.0-gt2-2.6/build.xml
Log:
build.xml erweitert, dass die pro?\225?\185?\149erties datein automatisch immer in utf8 inline umgewandelt werden wenn ein JAR gebaut wird

Added: branches/1.0-gt2-2.6/ant-contrib-1.0b2.jar
===================================================================
(Binary files differ)


Property changes on: branches/1.0-gt2-2.6/ant-contrib-1.0b2.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: branches/1.0-gt2-2.6/build.xml
===================================================================
--- branches/1.0-gt2-2.6/build.xml	2009-12-09 17:04:19 UTC (rev 608)
+++ branches/1.0-gt2-2.6/build.xml	2009-12-09 17:05:21 UTC (rev 609)
@@ -12,7 +12,9 @@
      
      The default option is "basic"
 -->
-<project default="basic" basedir=".">
+<project default="basic" basedir="." xmlns:ac="antlib:net.sf.antcontrib">
+	<taskdef uri="antlib:net.sf.antcontrib" classpath="ant-contrib-1.0b2.jar" />
+
 	<!-- Project name -->
 	<property name="PROJECT.NAME"    value="schmitzm"/>
 	<!-- Version number added as postfix to files -->
@@ -55,7 +57,7 @@
 	</target>
 
 	<!-- ##############  Create a JAR from "classes" and ZIP it ############## -->
-	<target name="jar">
+	<target name="jar" depends="nativeToAscii">
 		<!-- Create the JAR -->
 		<delete failonerror="false" file="${FILE.JAR}"/>
 		<jar destfile="${FILE.JAR}" index="false" level="8" duplicate="preserve">
@@ -117,4 +119,26 @@
 			</zipfileset>
 		</zip>
 	</target>
+
+	<target name="nativeToAscii" description="Wandelt alle .properties dateien in src/ in ascii UTF8 um.">
+		<ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
+			<path>
+				<fileset dir="${DIR.SRC}" includes="**/*.properties" />
+			</path>
+			<sequential>
+				<move file="@{file}" overwrite="true" tofile="@{file}Native" verbose="false"/> 
+			</sequential>
+		</ac:for>
+		<native2ascii encoding="ISO8859_15" src="${DIR.SRC}" includes="**/*.propertiesNative" dest="${DIR.SRC}" ext=".properties" />
+		
+		<ac:for xmlns:ac="antlib:net.sf.antcontrib" param="file">
+			<path>
+				<fileset dir="${DIR.SRC}" includes="**/*.propertiesNative" />
+			</path>
+			<sequential>
+				<delete file="@{file}" quiet="true"/> 
+			</sequential>
+		</ac:for>
+	</target>
+
 </project>



More information about the Schmitzm-commits mailing list