ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: optional tasks without disturbing the ant/lib folder
Date Tue, 16 Aug 2005 14:29:57 GMT
sure - see http://ant.apache.org/manual/install.html#librarydependencies

Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Mark Lybarger [mailto:mlybarger@gmail.com] 
>Gesendet: Dienstag, 16. August 2005 16:28
>An: Ant Users List
>Betreff: Re: optional tasks without disturbing the ant/lib folder
>
>very interesting! 
>
>i created an antlib.xml file in mylibdir/antlib.xml
>
><antlib>
><!-- typedef the tasks that work for ant less than 1.6 --> 
><taskdef resource="ant-jsch.properties"/>
>
><!-- condition typedefs - these do not work for ant less than 
>1.6 --> </antlib>
>
>also mylibdir/ant-jsch.properties
>
>scp=org.apache.tools.ant.taskdefs.optional.ssh.Scp
>sshexec=org.apache.tools.ant.taskdefs.optional.ssh.SSHExec
>
>and build.xml:
>
><project name="myproject" xmlns:my="antlib:mylibdir/antlib.xml" > ...
><my:scp ...
>
>which outputs:
>
>D:\dev\workspace\autodeploy\build.xml:582: Could not create 
>task or type of
>type: antlib:mylibdir/antlib.xml:scp.
>
>am i missing something obvious?
>
>
>On 8/16/05, Jan.Materne@rzf.fin-nrw.de 
><Jan.Materne@rzf.fin-nrw.de> wrote:
>> 
>> >what would be really nice is if there were two "namespaces"
>> >available for a given optional task. such that the task in the 
>> >ant/lib/ant-jsch.jar would
>> >have:
>> >
>> ><taskdef name="scp" classname="
>> >org.apache.tools.ant.taskdefs.optional.ssh.Scp">
>> >
>> >and perhaps an ant/external/lib/ant-jsch.jar would have:
>> >
>> ><taskdef name="e_scp" classname="
>> >external.org.apache.tools.ant.taskdefs.optional.ssh.Scp">
>> >
>> >thoughts/ideas?
>> 
>> XML namespaces.
>> 
>> <scp> is defined in
>> 
>[$ANT_HOME/lib/ant.jar!]org/apache/tools/ant/taskdefs/default.properti
>> es
>> 
>> Define your scp via an antlib.xml and load it <project 
>> xmlns:my="antlib:path/to/my/jar"> And use it with <my:scp>
>> 
>> 
>> Jan
>> 
>> ---------------------------------------------------------------------
>> 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