ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wascally Wabbit <wascallywab...@earthling.net>
Subject Re: JWare / AntXTras help
Date Wed, 25 Jul 2007 00:03:31 GMT
Typically three ways:

1) You can put the third-party jars into a location automatically
scanned by Ant using the methods described in the Ant manual
online: http://ant.apache.org/manual/running.html#libs

2) Or you can explicitly load things using a class path like
the sample did. Also see Ant manual online:
http://ant.apache.org/manual/using.html#path

3) Or you can use the special "antlib:" namespace. See:
http://ant.apache.org/manual/CoreTypes/antlib.html#antlibnamespace

HTH,
-The Wabbit


warhero wrote:
> Thanks much. Exactly what I was looking for. Is this generally how you
> utilize a jar in ant buildfiles?
> 
> Thanks again!!!
> 
> 
> 
> Wascally Wabbit wrote:
>> You're missing a required jar file: JWare_apis.jar (you need
>> *everything* inside the distro's lib directory).
>>
>> This test script works fine (note basedir is "."):
>>
>> <project name="test" default="task1" basedir=".">
>>    <taskdef resource="com/idaremedia/antx/install/antlib.xml">
>>      <classpath>
>>        <pathelement location="${basedir}/build/jar/JWare_apis.jar"/>
>>        <pathelement location="${basedir}/build/jar/AntX_tasks.jar"/>
>>      </classpath>
>>    </taskdef>
>>    <property file="./build/build.properties" />
>>    <target name="task1">
>>       <do if="props.myprop">
>>         <echo message="props.myprop=${props.myprop}"/>
>>       </do>
>>    </target>
>> </project>
>>
>>
>>
>> warhero wrote:
>>> Hey All,
>>>
>>> I'm trying to get up and running with JWare / AntXtras. need a little
>>> help.
>>> I'm building a build system that is being deployed to some developers.
>>> And I
>>> want to include some of the tasks in this library. But am not completely
>>> sure how to do it without modifying any ant config / libraries. I'm
>>> trying
>>> to do in thebuild file with taskdef. Heres my example:
>>>
>>> <project name="test" default="task1" basedir="../">
>>>
>>> 	<taskdef resource="com/idaremedia/antx/install/antlib.xml"
>>> classpath="${basedir}/build/jar/AntX_tasks.jar" />
>>> 	
>>> 	<!-- Load the properties file -->
>>> 	<property file="./build/build.properties" />
>>>
>>>         <target name="task1">
>>>             <do if="props.myprop">
>>>                <!-- something -->
>>>             </do>
>>>         </target>
>>> </project>
>>>
>>> I've tried a number of different ways with the taskdef tag.. no luck,
>>> dah!
>>> any help would be appreciated.
>>>
>>> -Aaron
>>
>> ---------------------------------------------------------------------
>> 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


Mime
View raw message