• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to include a jar file in current project

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am using ant mail task, i am able to send mail using that task when mail.jar is kept in ant's lib directory. Here my requirement is that i don't want it to be placed in that lib directory rather it must be placed in current project folder where my build.xml resides.

how to code that


usually this is how we include external jars

<path id="mailjar">
<fileset dir="." includes="**/*.jar"/>
</path>
<taskdef resource="???" classpathref="mailjar"/>

Note: I placed mail.jar in current folder where my build.xml is placed

but here what must be placed as resource name

Please and kindly help me

any help is greatly apprized

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't it be wonderful is the Ant docs had something about this?
http://ant.apache.org/manual/install.html#optionalTasks

Note that the <classpath> option is not available because the <mail> task does not accept a classpath.
 
ragz wifer
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Peter

you solved 2 issues of myne. Im greatly Thankful to you for your azoic reply and hope this azoic response continues when i query.


I solved this issue by placing jar present in current directory to ant/lib directory using the following code



here im copying the mail.jar present in current directory to ant/lib directory by fetching the environment variable ANT_HOME

Eventually im done with this.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic