Ok, I think i've worked out the namespace issues and have read a bit on ant namespaces for tasksdef's. It seems that namespaces/uri is used with taskdefs so that scp, and my:scp will allow the definition of both the ant-lib supplied:
scp=org.apache.tools.ant.taskdefs.optional.ssh.Scp and perhaps my own: scp=external.org.apache.tools.ant.taskdefs.optional.ssh.Scp this allows my code to use <my:scp > to refer to the second item, and still allows scp to refer to the first one. this merely seems related to the name the task will take in the ant script itself. it doesn't seem to have to do with the fact that org.apache.tools.ant.taskdefs.optional.ssh.Scp is defined in the ant-lib folder, and as such, a user can't use the scp task without modifications outside of their environment (as mentioned earlier, a user can use ~/.ant/lib, adding jsch.jar to ant-lib, or -antlib parameter, or remove the ant-jscp.jar from ant lib). what i'd like is to be able to use the scp task without modifying the installed ant, or modifying anything outside of the build environment. BUILD FAILED D:\dev\workspace\autodeploy\build.xml:570: taskdef A class needed by class org.apache.tools.ant.taskdefs.optional.ssh.SSHExec cannot be found: com/jcraft/jsch/UserInfo On 8/16/05, Mark Lybarger <[EMAIL PROTECTED]> wrote: > > i have both jsch.jar and ant-jsch.jar in mylibfolder, but i don't see that > i've tied the xmlns:my etc to my ant-jsch.xml > > perhaps i need a taskdev using the my: namespace so that it can see the > xml and .properties files. i'm not quite sure how this would look. > > > On 8/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED] > > wrote: > > > > sure - see http://ant.apache.org/manual/install.html#librarydependencies > > > > Jan > > > > >-----Ursprüngliche Nachricht----- > > >Von: Mark Lybarger [mailto:[EMAIL PROTECTED] > > >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, [EMAIL PROTECTED] > > ><[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For > > >additional > > >> commands, e-mail: [EMAIL PROTECTED] > > >> > > >> > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >