• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Path Convert tag

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing ant scripts which configure certain batch files.
I am using websphere ant (the version of ant which comes with websphere)
1.5.2

Most of my ant scripts take parameters ( mostly classpath) from the
properties file (saad.properties)

How can edit the classpath in a batch file/text file from ant?

I read Path Convert tag do that. I dont know how to implement it?

please give an working exmaple.

Saad Ahsan
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is your classpath in your properties file complete or do you need to modify it? Or build it in the build file?

I'm not really sure what you need to accomplish, but you wanted an example using path convert tag. I used it with a copy task to take a path that was specified and "build-converted" in the build.xml (maybe you are wanting to just get it from the properties file?) and put it into a .bat file.

Your mileage may vary, I was using 1.6.2. I used the example code for Copy and PathConvert from Ant Manual.

my build-convert.xml


Original .bat file:


modified .bat file
 
Is this the real life? Is this just fantasy? Is this a tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic