You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Artemis Ozten <ao...@webalg.com> on 2004/05/04 23:28:35 UTC

using telnet in ant 1.6.1

 
 
Hi
 
I have been using ant 1.5.4 and telnet task just fine in MS Windows. I
upgraded to ANT 1.6.1 and my telnet task fails:
 
C:\dev\build\remoteTarget.xml:207: Could not create task or type of typo
 
Ant could not find the task or a class this task relies upon.
 
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'telnet'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
............................
......................
 
 
I copied optional.jar and netComponents.jar to ANT_HOME/lib but result
did not change. The jars are old as ANT 1.5.4. Would that matter? Or
Should I declare the task too? 
 
Thanks for any insight you may offer,
 
Artemis
This e-mail may contain confidential, proprietary information on
DealerTrack.com, Inc.  It is intended solely for the name recipient(s)
listed above and should be maintained in strictest confidence.  If you
are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein (including any reliance thereon) is STRICTLY PROHIBITED.  If you
have received this e-mail in error, please immediately notify the sender
at and delete this information from your computer and destroy any
related paper copies.
 
.
 

If in MacroDef?

Posted by Pawanraj Sadhwani <pa...@elitecore.com>.
Hi,

I have a set of tasks repeating in the build file. uptil ant 1.5 i was using
the antcall with a parameter passed to a common task i had written.

In case of that target, i was using a if="foo" to allow for conditional
execution.

can similar thing be achieved using a macro? I refactored the common task
into a macro. now, when i call the macro, i would like an 'if' for the
execution. how to do it?

code snippet is:

<target name="do-all">
  <antcall target="do1" />
  <antcall target="do2" />
</target>

<target name="do1" if="do1.present">
  <antcall target="commondo">
    <param name="foo" value="1" />
  </antcall>
</target>

<target name="do2" if="do2.present">
  <antcall target="commondo">
    <param name="foo" value="2" />
  </antcall>
</target>

I could achieve what i want to by keeping antcalls in do-all and using macro
in do1 and do2.

However, I have a lot of antcalls in do-all which i dont like. Is it
possible to use if in the macro so i could replace ant-calls in do-all
target?

Thanx

Pawan


Maven style dependency list in Ant

Posted by Jens Riboe <je...@ribomation.com>.
Hi,

I've recently jumped off the Maven band-wagon, because it imposes too much
extra work every time one has do something non-standard, etc... more 
reasons...

Anyway, there are indeed some good thoughts in it, IMHO, and I which to 
continue
use these in Ant. I really appreciate the dependency/download idea and 
the report/site
generation support.

I bite the bullet and hacked a dependency list Ant task.
Here is a snippet showing what you can do

<dependencylist dir="${build.dir}/cache">
    <repositorylist>
        <localrepository dir="${repo.dir}"/>
        <mavenrepository url="http://www.ibiblio.org/maven/"/>
    </repositorylist>

    <dependency>
        <id>JakartaBeanUtils</id>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.6.1</version>
        <url>http://jakarta.apache.org/commons/beanutils/</url>
    </dependency>
    <dependency>
        <id>foo</id>
        <groupId>com.ribomation</groupId>
        <artifactId>foobar</artifactId>
        <version>1.0</version>
    </dependency>
</dependencylist>

More info can be found at
        http://www.ribomation.com/riboutils/DependencyList/

Comments/suggestions/complaints are welcome.

BTW. I still use Maven's report/site generation, and will continue that, 
until I either find
an Ant task with similar capability or implemented my own. Anyone 
knowing about ongoing
effort to mimic report/site generation in Ant?

Cheers,
    Jens Riboe
    jens.riboe@ribomation.com





RE: using telnet in ant 1.6.1

Posted by Pawanraj Sadhwani <pa...@elitecore.com>.
you probably need commons-net-1.2.0.jar in your lib.

I faced the same problem with FTP task on upgrading to 1.6.1 from 1.5.3. 

Ant uses the FTP, Telnet from commons-net-1.2.0.jar.

HTH

Pawan

-----Original Message-----
From: Artemis Ozten [mailto:aozten@webalg.com]
Sent: Wednesday, May 05, 2004 2:59 AM
To: user@ant.apache.org
Subject: using telnet in ant 1.6.1


 
 
Hi
 
I have been using ant 1.5.4 and telnet task just fine in MS Windows. I
upgraded to ANT 1.6.1 and my telnet task fails:
 
C:\dev\build\remoteTarget.xml:207: Could not create task or type of typo
 
Ant could not find the task or a class this task relies upon.
 
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'telnet'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
............................
......................
 
 
I copied optional.jar and netComponents.jar to ANT_HOME/lib but result
did not change. The jars are old as ANT 1.5.4. Would that matter? Or
Should I declare the task too? 
 
Thanks for any insight you may offer,
 
Artemis
This e-mail may contain confidential, proprietary information on
DealerTrack.com, Inc.  It is intended solely for the name recipient(s)
listed above and should be maintained in strictest confidence.  If you
are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein (including any reliance thereon) is STRICTLY PROHIBITED.  If you
have received this e-mail in error, please immediately notify the sender
at and delete this information from your computer and destroy any
related paper copies.
 
.