@@ -17,44 +17,42 @@
-->
<project name="manifestclasspath" default="tearDown">
<!-- hebrew -->
<property name="jom" value="םוי"/>
<!-- german -->
<property name="aent" value="ãnt"/>
<import file="../buildfiletest-base.xml"/>
<target name="setUp">
<property name="tmp" location="${basedir}/${ant.project.name}.tmp" />
<mkdir dir="${tmp}" />
<mkdir dir="${output}" />
</target>
<!-- hebrew -->
<property name="jom" value="םוי"/>
<!-- german -->
<property name="aent" value="ãnt"/>
<target name="fullSetUp" depends="setUp">
<mkdir dir="${tmp}/lib" />
<touch file="${tmp}/lib/acme-core.jar" />
<touch file="${tmp}/lib/acme-pres.jar" />
<mkdir dir="${tmp}/classes/dsp-core/com/lgc/infra/core" />
<mkdir dir="${tmp}/classes/dsp-pres/com/lgc/infra/pres" />
<mkdir dir="${tmp}/classes/dsp-void" />
<mkdir dir="${tmp}/generated/dsp-core/com/lgc/infra/core/generated" />
<mkdir dir="${tmp}/generated/dsp-pres" />
<mkdir dir="${tmp}/generated/dsp-void" />
<mkdir dir="${tmp}/resources/dsp-core/com/lgc/infra/core" />
<mkdir dir="${tmp}/resources/dsp-pres/com/lgc/infra/pres" />
<mkdir dir="${tmp}/resources/dsp-void" />
</target>
<mkdir dir="${output}/lib" />
<touch file="${output}/lib/acme-core.jar" />
<touch file="${output}/lib/acme-pres.jar" />
<target name="tearDown">
<delete dir="${tmp}" />
<mkdir dir="${output}/classes/dsp-core/com/lgc/infra/core" />
<mkdir dir="${output}/classes/dsp-pres/com/lgc/infra/pres" />
<mkdir dir="${output}/classes/dsp-void" />
<mkdir dir="${output}/generated/dsp-core/com/lgc/infra/core/generated" />
<mkdir dir="${output}/generated/dsp-pres" />
<mkdir dir="${output}/generated/dsp-void" />
<mkdir dir="${output}/resources/dsp-core/com/lgc/infra/core" />
<mkdir dir="${output}/resources/dsp-pres/com/lgc/infra/pres" />
<mkdir dir="${output}/resources/dsp-void" />
</target>
<target name="test-bad-directory">
<manifestclasspath property="jar.classpath"
jarfile="${tmp}/classpath.jar">
jarfile="${ou tput }/classpath.jar">
<classpath />
</manifestclasspath>
</target>
<target name="test-bad-no-property" depends="setUp">
<manifestclasspath jarfile="${tm p}/classpath.jar">
<manifestclasspath jarfile="${ou tput }/classpath.jar">
<classpath />
</manifestclasspath>
</target>
@@ -62,7 +60,7 @@
<target name="test-bad-property-exists" depends="setUp">
<property name="jar.classpath" value="exists" />
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classpath.jar">
jarfile="${ou tput }/classpath.jar">
<classpath />
</manifestclasspath>
</target>
@@ -75,56 +73,56 @@
<target name="test-bad-no-classpath" depends="setUp">
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classpath.jar" />
jarfile="${ou tput }/classpath.jar" />
</target>
<target name="test-pseudo-tahoe-refid" depends="fullSetUp">
<path id="classpath">
<!-- All the classes/ directories -->
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<!-- All the JAXB generated/ directories -->
<dirset dir="${tm p}/generated" includes="dsp-*">
<dirset dir="${ou tput }/generated" includes="dsp-*">
<!-- Add only non-empty directories to the classpath -->
<present targetdir="${tm p}/generated" present="both">
<present targetdir="${ou tput }/generated" present="both">
<mapper type="regexp" from="(.*)" to="\1/com" />
</present>
</dirset>
<!-- All the resources/ directories -->
<dirset dir="${tm p}/resources" includes="dsp-*">
<dirset dir="${ou tput }/resources" includes="dsp-*">
<!-- Add only non-empty directories to the classpath -->
<present targetdir="${tm p}/resources" present="both">
<present targetdir="${ou tput }/resources" present="both">
<mapper type="regexp" from="(.*)" to="\1/com" />
</present>
</dirset>
</path>
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classpath.jar">
jarfile="${ou tput }/classpath.jar">
<classpath refid="classpath" />
</manifestclasspath>
</target>
<target name="test-pseudo-tahoe-nested" depends="fullSetUp">
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classpath.jar">
jarfile="${ou tput }/classpath.jar">
<classpath>
<!-- All the classes/ directories -->
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<!-- All the JAXB generated/ directories -->
<dirset dir="${tm p}/generated" includes="dsp-*">
<dirset dir="${ou tput }/generated" includes="dsp-*">
<!-- Add only non-empty directories to the classpath -->
<present targetdir="${tm p}/generated" present="both">
<present targetdir="${ou tput }/generated" present="both">
<mapper type="regexp" from="(.*)" to="\1/com" />
</present>
</dirset>
<!-- All the resources/ directories -->
<dirset dir="${tm p}/resources" includes="dsp-*">
<dirset dir="${ou tput }/resources" includes="dsp-*">
<!-- Add only non-empty directories to the classpath -->
<present targetdir="${tm p}/resources" present="both">
<present targetdir="${ou tput }/resources" present="both">
<mapper type="regexp" from="(.*)" to="\1/com" />
</present>
</dirset>
@@ -134,48 +132,48 @@
<target name="test-parent-level1" depends="fullSetUp">
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classes/classpath.jar">
jarfile="${ou tput }/classes/classpath.jar">
<classpath>
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${tm p}/generated" includes="dsp-*" />
<dirset dir="${tm p}/resources" includes="dsp-*" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<dirset dir="${ou tput }/generated" includes="dsp-*" />
<dirset dir="${ou tput }/resources" includes="dsp-*" />
</classpath>
</manifestclasspath>
</target>
<target name="test-parent-level2" depends="fullSetUp">
<mkdir dir="${tm p}/classes/level2" />
<mkdir dir="${ou tput }/classes/level2" />
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classes/level2/classpath.jar">
jarfile="${ou tput }/classes/level2/classpath.jar">
<classpath>
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${tm p}/generated" includes="dsp-*" />
<dirset dir="${tm p}/resources" includes="dsp-*" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<dirset dir="${ou tput }/generated" includes="dsp-*" />
<dirset dir="${ou tput }/resources" includes="dsp-*" />
</classpath>
</manifestclasspath>
</target>
<target name="test-parent-level2-too-deep" depends="fullSetUp">
<mkdir dir="${tm p}/classes/level2" />
<mkdir dir="${ou tput }/classes/level2" />
<manifestclasspath property="jar.classpath" maxParentLevels="1"
jarfile="${tm p}/classes/level2/classpath.jar">
jarfile="${ou tput }/classes/level2/classpath.jar">
<classpath>
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${tm p}/generated" includes="dsp-*" />
<dirset dir="${tm p}/resources" includes="dsp-*" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<dirset dir="${ou tput }/generated" includes="dsp-*" />
<dirset dir="${ou tput }/resources" includes="dsp-*" />
</classpath>
</manifestclasspath>
</target>
<target name="test-parent-level2-with-jars" depends="fullSetUp">
<mkdir dir="${tm p}/classes/level2" />
<mkdir dir="${ou tput }/classes/level2" />
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/classes/level2/classpath.jar">
jarfile="${ou tput }/classes/level2/classpath.jar">
<classpath>
<fileset dir="${tm p}/lib" includes="*.jar" />
<dirset dir="${tm p}/classes" includes="dsp-*" />
<dirset dir="${tm p}/generated" includes="dsp-*" />
<dirset dir="${tm p}/resources" includes="dsp-*" />
<fileset dir="${ou tput }/lib" includes="*.jar" />
<dirset dir="${ou tput }/classes" includes="dsp-*" />
<dirset dir="${ou tput }/generated" includes="dsp-*" />
<dirset dir="${ou tput }/resources" includes="dsp-*" />
</classpath>
</manifestclasspath>
</target>
@@ -191,22 +189,22 @@
</antcall>
</target>
<target name="run-two-jars">
<mkdir dir="${tm p}/${ext.dir}"/>
<javac srcdir="manifestclasspath" destdir="${tm p}" />
<jar destfile="${tm p}/${ext.dir}/alpha.jar">
<fileset dir="${tm p}">
<mkdir dir="${ou tput }/${ext.dir}"/>
<javac srcdir="manifestclasspath" destdir="${ou tput }" />
<jar destfile="${ou tput }/${ext.dir}/alpha.jar">
<fileset dir="${ou tput }">
<include name="Alpha.class"/>
</fileset>
</jar>
<manifestclasspath property="jar.classpath"
jarfile="${tm p}/beta.jar">
jarfile="${ou tput }/beta.jar">
<classpath>
<pathelement location="${tm p}/beta.jar"/>
<pathelement location="${tm p}/${ext.dir}/alpha.jar"/>
<pathelement location="${ou tput }/beta.jar"/>
<pathelement location="${ou tput }/${ext.dir}/alpha.jar"/>
</classpath>
</manifestclasspath>
<jar destfile="${tm p}/beta.jar" >
<fileset dir="${tm p}">
<jar destfile="${ou tput }/beta.jar" >
<fileset dir="${ou tput }">
<include name="Beta.class"/>
</fileset>
<manifest>
@@ -214,7 +212,7 @@
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
<java fork="true" jar="${tm p}/beta.jar"/>
<java fork="true" jar="${ou tput }/beta.jar"/>
</target>
<target name="testSameDrive">