ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pritesh saharey <prit...@sqatester.com>
Subject Re: classpath
Date Tue, 18 Mar 2003 05:05:55 GMT
or do it like this

<path id="classpath">
		<fileset dir="../lib">
			<include name="*.jar"/>
		</fileset>
</path>

and for java task use it like this

<java append="true" fork="true" failonerror="true" 
					classpathref="classpath"
					classname="abc">
					<arg line="-f ..."/>
			</java>

pritesh
--- Erik Hatcher <jakarta-ant@ehatchersolutions.com> wrote:
>You've just touched on one of the nicest things about Ant... its path 
>handling.  Yes, Ant can do this easily, for example:
>
>     <path id="common.compile.classpath">
>         <pathelement location="${lucene.jar}"/>
>     </path>
>
>     <path id="common.test.classpath">
>         <pathelement location="${junit.jar}"/>
>         <path refid="common.compile.classpath"/>
>     </path>
>
>So common path is defined and then a larger path is constructed using 
>it (nevermind the property references for now, if you aren't familiar 
>with the ${...} syntax).
>
>Then use either classpathref="common.compile.classpath" on <java> and 
><javac> or use the nested <classpath> element with the same nested 
><path refid="..."> construct as shown above to pull in a previously 
>defined path.
>
>	Erik
>
>
>On Monday, March 17, 2003, at 04:59  PM, Matthew Hardin wrote:
>
>> Is it possible to set a classpath element that can be
>> used throughout your build file? In other words, I have
>> several java and javac tasks within my file that all
>> use the same classpath.  Yet it seems I have to define
>> it for everyone. How can I consolidate this to one
>> place so I only have to make one change when it needs
>> updating?
>>
>> Thanks,
>> Matthew Hardin
>>
>> Matthew Hardin
>> matthew@hardin.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm

_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP &
more! http://www.everyone.net/selectmail?campaign=tag

Mime
View raw message