S
sowbug
My script will exclude whole directories in the javac task, but it
will not exclude individual files from being compiled. Can someone
please have a look and tell me what I'm doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="../../java/" default="all" name="BuildProject">
<target name="init">
<property name="hello" value="world"/>
<property name="project_dir" value="/Project/"/>
<property name="java_dir" value="/home/Jack/cvs/ascii/java/"/>
</target>
<target depends="init" name="clean" description="Clean all build
products">
<delete failonerror="false">
<fileset dir="${project_dir}">
<exclude name="j2sdk1.4.1"/>
</fileset>
</delete>
</target>
<target depends="init,clean" name="checkout">
<!--<exec dir="/home/Jack" executable="./cvs_commit.sh"/>
<exec dir="/home/Jack" executable="./checkout.sh"/>
<exec dir="/home/Jack" executable="./cvs_edit.sh"/>-->
</target>
<target name="XmlValidate">
<property name="xml_dir" value="../xml"/>
<xmlvalidate failonerror="no" warn="no" >
<fileset dir="${xml_dir}/docs" includes="**/*.xml"/>
<fileset dir="${xml_dir}/programs" includes="**/*.xml" />
<fileset dir="${xml_dir}/reports" includes="**/*.xml"/>
</xmlvalidate>
</target>
<target depends="init,clean,checkout" name="compile">
<javac nowarn="true" debug="true" verbose="false"
deprecation="true" destdir="${project_dir}" srcdir="${java_dir}"
failonerror="false" fork="yes" memoryMaximumSize="512m">
<classpath><pathelement
location="${java_dir}"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/AbsoluteLayout.jar"/></classpath>
<include name="com/"/>
</javac>
<javac nowarn="true" debug="true" verbose="false"
deprecation="true" destdir="${project_dir}" srcdir="${java_dir}"
failonerror="false" fork="yes" memoryMaximumSize="512m">
<classpath><pathelement
location="${java_dir}"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/AbsoluteLayout.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/junit-ext.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/junit.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/TimerBean.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/DataVision.jar"/></classpath>
<include name="ar/"/>
<exclude name="ar/client/project/ext/"/>
<exclude name="ar/client/dp/ext/"/>
<exclude name="ar/client/dp/server/ServerUBP.java"/>
<exclude name="ar/client/dp/server/ServerURL.java"/>
<exclude name="ar/client/project/server/ServerUSH.java"/>
<exclude name="ar/client/project/server/ServerUQY.java"/>
<exclude
name="ar/client/project/junit/generated/bp/BP7901Test.java"/>
<exclude name="ar/client/project/server/ServerUUT.java"/>
<exclude
name="ar/client/project/server/ServerR7018.java"/>
<exclude
name="ar/client/project/server/ServerR7153.java"/>
<exclude
name="ar/client/project/server/ServerR7240.java"/>
<exclude
name="ar/client/project/server/ServerR7285.java"/>
<exclude
name="ar/client/dp/server/ServerSysDeviceProf.java"/>
<exclude
name="ar/client/dp/server/ServerSysUserProf.java"/>
<exclude
name="ar/client/project/server/ServerDataDictionary.java"/>
<exclude
name="ar/client/project/server/ServerDialogCheckSheet.java"/>
</javac>
</target>
<target depends="init,clean,checkout,compile,XmlValidate"
description="Build everything" name="all">
<echo message="Application built. Hello ${hello}!"/>
</target>
</project>
will not exclude individual files from being compiled. Can someone
please have a look and tell me what I'm doing wrong?
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="../../java/" default="all" name="BuildProject">
<target name="init">
<property name="hello" value="world"/>
<property name="project_dir" value="/Project/"/>
<property name="java_dir" value="/home/Jack/cvs/ascii/java/"/>
</target>
<target depends="init" name="clean" description="Clean all build
products">
<delete failonerror="false">
<fileset dir="${project_dir}">
<exclude name="j2sdk1.4.1"/>
</fileset>
</delete>
</target>
<target depends="init,clean" name="checkout">
<!--<exec dir="/home/Jack" executable="./cvs_commit.sh"/>
<exec dir="/home/Jack" executable="./checkout.sh"/>
<exec dir="/home/Jack" executable="./cvs_edit.sh"/>-->
</target>
<target name="XmlValidate">
<property name="xml_dir" value="../xml"/>
<xmlvalidate failonerror="no" warn="no" >
<fileset dir="${xml_dir}/docs" includes="**/*.xml"/>
<fileset dir="${xml_dir}/programs" includes="**/*.xml" />
<fileset dir="${xml_dir}/reports" includes="**/*.xml"/>
</xmlvalidate>
</target>
<target depends="init,clean,checkout" name="compile">
<javac nowarn="true" debug="true" verbose="false"
deprecation="true" destdir="${project_dir}" srcdir="${java_dir}"
failonerror="false" fork="yes" memoryMaximumSize="512m">
<classpath><pathelement
location="${java_dir}"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/AbsoluteLayout.jar"/></classpath>
<include name="com/"/>
</javac>
<javac nowarn="true" debug="true" verbose="false"
deprecation="true" destdir="${project_dir}" srcdir="${java_dir}"
failonerror="false" fork="yes" memoryMaximumSize="512m">
<classpath><pathelement
location="${java_dir}"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/AbsoluteLayout.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/junit-ext.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/junit.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/TimerBean.jar"/></classpath>
<classpath><pathelement
location="${project_dir}j2sdk1.4.1/lib/ext/DataVision.jar"/></classpath>
<include name="ar/"/>
<exclude name="ar/client/project/ext/"/>
<exclude name="ar/client/dp/ext/"/>
<exclude name="ar/client/dp/server/ServerUBP.java"/>
<exclude name="ar/client/dp/server/ServerURL.java"/>
<exclude name="ar/client/project/server/ServerUSH.java"/>
<exclude name="ar/client/project/server/ServerUQY.java"/>
<exclude
name="ar/client/project/junit/generated/bp/BP7901Test.java"/>
<exclude name="ar/client/project/server/ServerUUT.java"/>
<exclude
name="ar/client/project/server/ServerR7018.java"/>
<exclude
name="ar/client/project/server/ServerR7153.java"/>
<exclude
name="ar/client/project/server/ServerR7240.java"/>
<exclude
name="ar/client/project/server/ServerR7285.java"/>
<exclude
name="ar/client/dp/server/ServerSysDeviceProf.java"/>
<exclude
name="ar/client/dp/server/ServerSysUserProf.java"/>
<exclude
name="ar/client/project/server/ServerDataDictionary.java"/>
<exclude
name="ar/client/project/server/ServerDialogCheckSheet.java"/>
</javac>
</target>
<target depends="init,clean,checkout,compile,XmlValidate"
description="Build everything" name="all">
<echo message="Application built. Hello ${hello}!"/>
</target>
</project>