ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject Re: optional tasks without disturbing the ant/lib folder
Date Tue, 16 Aug 2005 14:28:11 GMT
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.properties
> 
> 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
> 
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message