Commit 6fc5a38a authored by Florian Schmaus's avatar Florian Schmaus

Use presetdef for javac with encoding=utf8

parent c1b31ba3
...@@ -180,6 +180,9 @@ ...@@ -180,6 +180,9 @@
<include name="**/*.js"/> <include name="**/*.js"/>
</patternset> </patternset>
<presetdef name="of.javac">
<javac encoding="utf8" source="${javac.source}" target="${javac.target}"/>
</presetdef>
<!-- ======================================================================================= --> <!-- ======================================================================================= -->
<!-- GLOBAL TASKDEFs --> <!-- GLOBAL TASKDEFs -->
<!-- ======================================================================================= --> <!-- ======================================================================================= -->
...@@ -262,19 +265,17 @@ ...@@ -262,19 +265,17 @@
<!-- compile =============================================================================== --> <!-- compile =============================================================================== -->
<target name="compile" depends="init" description="Compiles Openfire app code"> <target name="compile" depends="init" description="Compiles Openfire app code">
<mkdir dir="${compile.dir}"/> <mkdir dir="${compile.dir}"/>
<javac <of.javac
destdir="${compile.dir}" destdir="${compile.dir}"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
> >
<src path="${src.java.dir}"/> <src path="${src.java.dir}"/>
<patternset refid="compile.sources"/> <patternset refid="compile.sources"/>
<classpath> <classpath>
<path refid="compile.dependencies"/> <path refid="compile.dependencies"/>
</classpath> </classpath>
</javac> </of.javac>
<available file="${overlay.src.dir}" type="dir" property="overlay.source.found"/> <available file="${overlay.src.dir}" type="dir" property="overlay.source.found"/>
<if> <if>
...@@ -282,12 +283,10 @@ ...@@ -282,12 +283,10 @@
<then> <then>
<mkdir dir="${overlay.compile.dir}"/> <mkdir dir="${overlay.compile.dir}"/>
<javac <of.javac
destdir="${overlay.compile.dir}" destdir="${overlay.compile.dir}"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
> >
<src path="${overlay.src.dir}"/> <src path="${overlay.src.dir}"/>
<patternset refid="compile.sources"/> <patternset refid="compile.sources"/>
...@@ -295,7 +294,7 @@ ...@@ -295,7 +294,7 @@
<path refid="compile.dependencies"/> <path refid="compile.dependencies"/>
<path location="${compile.dir}"/> <path location="${compile.dir}"/>
</classpath> </classpath>
</javac> </of.javac>
</then> </then>
<else><echo>Nothing to compile from custom here </echo></else> <else><echo>Nothing to compile from custom here </echo></else>
...@@ -540,12 +539,10 @@ ...@@ -540,12 +539,10 @@
</java> </java>
<!-- Compile java source --> <!-- Compile java source -->
<javac <of.javac
destdir="${jspc.classes.dest.dir}" destdir="${jspc.classes.dest.dir}"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
includes="org/jivesoftware/openfire/admin/**/*.java" includes="org/jivesoftware/openfire/admin/**/*.java"
> >
<src path="${jspc.java.dest.dir}"/> <src path="${jspc.java.dest.dir}"/>
...@@ -553,7 +550,7 @@ ...@@ -553,7 +550,7 @@
<pathelement path="${compile.dir}"/> <pathelement path="${compile.dir}"/>
<path refid="jspc.dependencies"/> <path refid="jspc.dependencies"/>
</classpath> </classpath>
</javac> </of.javac>
<!-- Update the web.xml to include the servlet and servlet mapping defs from jspc --> <!-- Update the web.xml to include the servlet and servlet mapping defs from jspc -->
<loadfile property="servlet-xml" srcFile="${jspc.dest.dir}/web.partial.xml" failonerror="false" /> <loadfile property="servlet-xml" srcFile="${jspc.dest.dir}/web.partial.xml" failonerror="false" />
...@@ -590,12 +587,10 @@ ...@@ -590,12 +587,10 @@
<target name="test" depends="openfire" description="Compiles and runs test cases"> <target name="test" depends="openfire" description="Compiles and runs test cases">
<!-- Compile all test code --> <!-- Compile all test code -->
<mkdir dir="${test.classes.dest.dir}"/> <mkdir dir="${test.classes.dest.dir}"/>
<javac <of.javac
destdir="${test.classes.dest.dir}" destdir="${test.classes.dest.dir}"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
> >
<src path="${src.test.java.dir}"/> <src path="${src.test.java.dir}"/>
<patternset refid="test.sources"/> <patternset refid="test.sources"/>
...@@ -603,7 +598,7 @@ ...@@ -603,7 +598,7 @@
<path refid="test.dependencies"/> <path refid="test.dependencies"/>
<pathelement path="${compile.dir}"/> <pathelement path="${compile.dir}"/>
</classpath> </classpath>
</javac> </of.javac>
<!-- Copy resources --> <!-- Copy resources -->
<copy todir="${test.dest.dir}"> <copy todir="${test.dest.dir}">
...@@ -1326,12 +1321,10 @@ ...@@ -1326,12 +1321,10 @@
<!-- Compile plugin source code --> <!-- Compile plugin source code -->
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/classes"/> <mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/classes"/>
<javac <of.javac
destdir="${plugin.dev.dest.dir}/@{plugin}/target/classes" destdir="${plugin.dev.dest.dir}/@{plugin}/target/classes"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
> >
<src path="@{pluginsrc}/@{plugin}/src/java"/> <src path="@{pluginsrc}/@{plugin}/src/java"/>
<classpath> <classpath>
...@@ -1339,7 +1332,7 @@ ...@@ -1339,7 +1332,7 @@
<!-- Jars used by the plugin to compile with --> <!-- Jars used by the plugin to compile with -->
<fileset dir="@{pluginsrc}/@{plugin}" includes="lib/*.jar"/> <fileset dir="@{pluginsrc}/@{plugin}" includes="lib/*.jar"/>
</classpath> </classpath>
</javac> </of.javac>
<mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/lib" /> <mkdir dir="${plugin.dev.dest.dir}/@{plugin}/target/lib" />
...@@ -1366,11 +1359,10 @@ ...@@ -1366,11 +1359,10 @@
<mapper type="merge" to="@{pluginlib}/@{plugin}-lib.jar"/> <mapper type="merge" to="@{pluginlib}/@{plugin}-lib.jar"/>
</uptodate></not> </uptodate></not>
<then> <then>
<javac <of.javac
destdir="@{pluginlib}/classes" destdir="@{pluginlib}/classes"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
includes="**/*.java" includes="**/*.java"
> >
<src path="@{pluginlib}/source"/> <src path="@{pluginlib}/source"/>
...@@ -1382,7 +1374,7 @@ ...@@ -1382,7 +1374,7 @@
<fileset dir="@{pluginsrc}/@{plugin}" includes="lib/*.jar"/> <fileset dir="@{pluginsrc}/@{plugin}" includes="lib/*.jar"/>
</path> </path>
</classpath> </classpath>
</javac> </of.javac>
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/@{plugin}-lib.jar"> <jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/@{plugin}-lib.jar">
...@@ -1534,12 +1526,10 @@ ...@@ -1534,12 +1526,10 @@
</if> </if>
<!-- Compile java classes --> <!-- Compile java classes -->
<javac <of.javac
destdir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/classes" destdir="${plugin.dev.dest.dir}/@{plugin}/target/jspc/classes"
includeAntRuntime="no" includeAntRuntime="no"
debug="on" debug="on"
source="${javac.source}"
target="${javac.target}"
> >
<src path="${plugin.dev.dest.dir}/@{plugin}/target/jspc/java"/> <src path="${plugin.dev.dest.dir}/@{plugin}/target/jspc/java"/>
<classpath> <classpath>
...@@ -1547,7 +1537,7 @@ ...@@ -1547,7 +1537,7 @@
<pathelement path="${compile.dir}"/> <pathelement path="${compile.dir}"/>
<fileset dir="${plugin.dev.dest.dir}/@{plugin}/target" includes="lib/*.jar"/> <fileset dir="${plugin.dev.dest.dir}/@{plugin}/target" includes="lib/*.jar"/>
</classpath> </classpath>
</javac> </of.javac>
<!-- Make a jar of compiled jsp classes --> <!-- Make a jar of compiled jsp classes -->
<jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}-jspc.jar"> <jar jarfile="${plugin.dev.dest.dir}/@{plugin}/target/lib/plugin-@{plugin}-jspc.jar">
...@@ -1648,17 +1638,16 @@ ...@@ -1648,17 +1638,16 @@
<mkdir dir="${anttools.target.dir}"/> <mkdir dir="${anttools.target.dir}"/>
<mkdir dir="${anttools.target.dir}/classes"/> <mkdir dir="${anttools.target.dir}/classes"/>
<javac <of.javac
destdir="${anttools.target.dir}/classes" destdir="${anttools.target.dir}/classes"
debug="on" debug="on"
source="${javac.source}"
> >
<src path="${anttools.src.dir}"/> <src path="${anttools.src.dir}"/>
<patternset refid="compile.sources"/> <patternset refid="compile.sources"/>
<classpath> <classpath>
<path refid="compile.dependencies"/> <path refid="compile.dependencies"/>
</classpath> </classpath>
</javac> </of.javac>
<jar jarfile="${anttools.target.dir}/ant-subdirtask.jar"> <jar jarfile="${anttools.target.dir}/ant-subdirtask.jar">
<fileset dir="${anttools.target.dir}/classes" includes="**/*.class"/> <fileset dir="${anttools.target.dir}/classes" includes="**/*.class"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment