My lazy header ...

AntDoc
Target antdoc.classpath

antdoc.classpath
  |
  +--init

Defines the paths useful when compiling, running Java classes, generate JavaDoc.

This target enables to centralize where the necessary classpaths are defined. The APPLET_CLASSPATH and FULL_CLASSPATH paths are being defined. The target will fail is some mandatory resources are missing, like some jar libraries.

Detail:
<target
	depends="init"
	description="Defines the paths useful when compiling, running Java classes, generate JavaDoc."
	name="antdoc.classpath"
>

	<property
		location="${ant.home}/lib/ant.jar"
		name="ANT_JAR"
	/>

	<property
		location="${ant.home}/lib/log4j-1.2.8.jar"
		name="LOG4J_JAR"
	/>

	<condition property="LOG4J_OK">
		<available file="${LOG4J_JAR}"/>
	</condition>

	<antcall target="fail.unless">
		<param
			name="PROPERTY_NAME"
			value="${LOG4J_OK}"
		/>

		<param
			name="MESSAGE"
			value="log4j 'log4j-1.2.8.jar' library is missing from Ant libray directory ('${LOG4J_JAR}' missing)"
		/>
	</antcall>

	<property
		location="${ant.home}/lib/jdom.jar"
		name="JDOM_JAR"
	/>
	<--Not supported by Ant V1.4.1-->
	<--fail unless="LOG4J_OK">log4j log4j-1.2.8.jar library is missing from Ant libray directory ('${LOG4J_JAR}' missing)</fail-->

	<condition property="JDOM_OK">
		<available file="${JDOM_JAR}"/>
	</condition>

	<antcall target="fail.unless">
		<param
			name="PROPERTY_NAME"
			value="${JDOM_OK}"
		/>

		<param
			name="MESSAGE"
			value="jdom 'jdom.jar' library is missing from Ant libray directory ('${JDOM_JAR}' missing)"
		/>
	</antcall>
	<--Not supported by Ant V1.4.1-->
	<--fail unless="JDOM_OK">jdom 'jdom.jar' library is missing from Ant libray directory ('${JDOM_JAR}' missing)</fail-->

	<property
		location="${IDEA_HOME_PATH}/lib/openapi.jar"
		name="IDEA_OPENAPI_JAR"
	/>

	<condition property="IDEA_OPENAPI_OK">
		<available file="${IDEA_OPENAPI_JAR}"/>
	</condition>

	<antcall target="fail.unless">
		<param
			name="PROPERTY_NAME"
			value="${IDEA_OPENAPI_OK}"
		/>

		<param
			name="MESSAGE"
			value="IDEA open API 'openapi.jar' library is missing from IDEA libray directory ('${IDEA_OPENAPI_JAR}' missing)"
		/>
	</antcall>
	<--Not supported by Ant V1.4.1-->
	<--fail unless="IDEA_OPENAPI_OK">IDEA open API 'openapi.jar' library is missing from IDEA libray directory ('${IDEA_OPENAPI_JAR}'
                        missing)</fail-->

	<available
		file="${ant.home}/lib/jaxp.jar"
		property="JAXP_JAR"
		value="${ant.home}/lib/jaxp.jar"
	/>

	<available
		file="${ant.home}/lib/xml-apis.jar"
		property="XMLAPI_JAR"
		value="${ant.home}/lib/xml-apis.jar"
	/>

	<property
		location="${ant.home}/lib/jakarta-regexp-1.2.jar"
		name="REGEXP_JAR"
	/>

	<available
		file="${ant.home}/lib/saxon.jar"
		property="SAXON_JAR"
		value="${ant.home}/lib/saxon.jar"
	/>

	<available
		file="${ant.home}/lib/xalan.jar"
		property="XALAN_JAR"
		value="${ant.home}/lib/xalan.jar"
	/>

	<path id="APPLET_CLASSPATH">

		<pathelement location="${ANT_JAR}"/>

		<pathelement location="${LOG4J_JAR}"/>
		<--pathelement location="${JAXP_JAR}"/-->

		<pathelement location="${XMLAPI_JAR}"/>
		<--pathelement location="${SAXON_JAR}"/-->

		<pathelement location="${XALAN_JAR}"/>
	</path>

	<path id="FULL_CLASSPATH">
		<path refid="APPLET_CLASSPATH"/>

		<pathelement location="${JDOM_JAR}"/>

		<pathelement location="${IDEA_OPENAPI_JAR}"/>
	</path>

	<property
		location="${JDK1.3_HOME_PATH}/bin/javac"
		name="JDK1.3_JAVAC_FILE_PATH"
	/>

	<property
		location="${JDK1.4_HOME_PATH}/bin/javac"
		name="JDK1.4_JAVAC_FILE_PATH"
	/>

	<property
		location="${DISTRIBUTION_DIRECTORY_PATH}/AntDocCore.jar"
		name="ANTDOC_CORE_JAR_FILE_PATH"
	/>

	<property
		location="${DISTRIBUTION_DIRECTORY_PATH}/AntDocGUI.jar"
		name="ANTDOC_GUI_JAR_FILE_PATH"
	/>

	<property
		location="${DISTRIBUTION_DIRECTORY_PATH}/AntDocApplet.jar"
		name="ANTDOC_APPLET_JAR_FILE_PATH"
	/>
</target>

... is just like my footer!

Edouard Mercier 2003.12.08 20:31:08 - AntDoc V0.8h - XSL Transformer Factory: com.icl.saxon.TransformerFactoryImpl