ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartman, Shane" <>
Subject RE: How to change classpath for two targets of same build?
Date Fri, 28 May 2004 14:46:37 GMT
I have used multiple path id's.. See below..

<?xml version="1.0" encoding="UTF-8"?>
<project name="event" default="compile_source">
	<property file=""/>
	<path id="library.path">
		<fileset dir="${root}/lib">
			<include name="**/*.jar"/>
			<include name="**/*.zip"/>
	<path id="library2.path">
		<fileset dir="${localdir}/lib">
			<include name="**/*.jar"/>
			<include name="**/*.zip"/>

	<property name="build" location="${localdir}/event/build"/>
	<property name="root" location="${localdir}/event"/>
	<!-- Compile the java source into the deploy directory with
optimization -->
	<target name="compile_source">
	<mkdir dir="${localdir}/event/build"/>
		<echo>Compiling source</echo>
		<javac srcdir="${localdir}/framework/src" destdir="${build}"
			<classpath refid="library.path"/>
		 <javac srcdir="${localdir}/event/src" destdir="${build}"
			<classpath refid="library2.path"/>

	  <antcall target="create_jar"/>
	<!-- Create the JAR file to be deployed -->
	<target name="create_jar">
		<echo>Creating JAR file from compiled source</echo>
		<jar destfile="${localdir}/lib/event.jar"
			<fileset dir="${root}" includes="*.xml"/>

-- I think this should resolve your conflict...

-----Original Message-----
From: [] 
Sent: Friday, May 28, 2004 10:38 AM
Subject: How to change classpath for two targets of same build?

I have not been able to figure out how to use different classpath for two 
different targets of the same build, or for two tasks within a target.  In 
my case, I am trying to use <xmlvalidate> with validation using XSD 
schemas.  This works, but it requires that I use xerces 2.6.2 with 
resolver.jar on the classpath.

Unfortunately, this config breaks the <xslt> task.  In order to make 
<xslt> run successfully, I have to remove resolver.jar from the classpath. 
 With resolver.jar on the classpath, I get an exception during the parse. 
Removing resolver.jar from the classpath eliminates the exception.

So the question is -- how can I specify one classpath for the xslt task, 
and a different one for xmlvalidate task.  I tried nested classpath 
elements, but that seems to have no effect.

Michael Giroux

C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/templates/sun2jonas.xslt:40:59: Fatal 
Error! java.lang.reflect.InvocationTargetException Cause: 
Fatal Error! Fatal error during transformation Cause: Fatal error during 
C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/templates/sun2jonas.xslt:144:28: Fatal 
Error! Fatal error during transformation Cause: Fatal error during 
     [xslt] Failed to process 

To unsubscribe, e-mail:
For additional commands, e-mail:
This email and any attachments constitute non-public information for use
only by intended recipient(s) and may contain confidential information.  If
you are not an intended recipient, please notify our Information Security
Officer immediately at (941) 906-5844 and permanently delete the original of
this email and any attachments, as well as any copies or printouts thereof.
The unauthorized use, dissemination, distribution or reproduction of this
email and any attachments is prohibited and may be unlawful.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message