I'm having two problems I don't understand with the build file below.
(It's for building a local version with debugging information of the
JRE).
One problem is that the targets compile_java and compile_javax get
executed even when the corresponding source files have remained
unchanged since the previous build. In contrast, the target
compile_rest behaves appropriately (i.e. only those source files that
have changed since the previous build get compiled).
[ Aside, the reason for breaking down the compilation into three
stages is that when I try compiling all files at once, javac fails
with an "insufficient memory" error. ]
The second problem is that, despite the excludes attribute in the
following target, the *.java files in
${src}/com/sun/java/swing/plaf/windows still get compiled:
<target name="compile_rest" depends="compile_javax">
<javac srcdir="${src}"
destdir="${build}"
debug="${debug}"
excludes="${src}/com/sun/java/swing/plaf/windows/**/*.java"/>
</target>
In order to prevent the compilation of these files, I had to change
the name of the windows directory to _windows, and replace the
excludes attribute above with excludes="**/_*/**/*.java". What's the
deal here?
Any suggestions or comments would be much appreciated. Thanks in advance.
kj
PS: Please Cc me in your replies to the list.
<project name="MyJava" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" value="/home/kynn/opt/java/jdk/src"/>
<property name="build" value="/home/kynn/opt/java/jdk/tmp"/>
<property name="dist" value="dist"/>
<property name="debug" value="on"/>
<property name="withsource" value="1"/>
<target name="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<condition property="withsource">
<isset property="debug"/>
</condition>
</target>
<target name="compile_java">
<javac srcdir="${src}/java"
destdir="${build}"
debug="${debug}"/>
</target>
<target name="compile_javax" depends="compile_java">
<javac srcdir="${src}/javax"
destdir="${build}"
debug="${debug}"/>
</target>
<!-- doesn't work:
<target name="compile_rest" depends="compile_javax">
<javac srcdir="${src}"
destdir="${build}"
debug="${debug}"
excludes="${src}/com/sun/java/swing/plaf/windows/**/*.java"/>
</target>
-->
<target name="compile_rest" depends="compile_javax">
<javac srcdir="${src}"
destdir="${build}"
debug="${debug}"
excludes="**/_*/**/*.java"/>
</target>
<target name="jar" depends="init,compile_rest">
<jar jarfile="rt.jar" manifest="MANIFEST.MF">
<fileset dir="${build}"/>
<fileset dir=".">
<include name="**/*.java" if="withsource"/>
</fileset>
</jar>
</target>
<target name="dist" depends="jar"/>
<target name="clean" depends="init">
<delete file="rt.jar"/>
<delete>
<fileset dir="${build}" includes="**/*.class"/>
</delete>
</target>
</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>