• 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

passing arguments to ant

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

I want to call a target from an other antfile (using <ant ...> , but I also want to add arguments to ant . (And I don't want to use exec).
So my Question
*Is there a way to call an ant target from an other build.file by using ant, and adding command line values to ant? *

I tried it that way, but it doesn't work.



I would like to call the target from the buildfile build.xml, with logging .
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to pass command line args, you would have to start another JVM. The ant task doesn't do this. The property tag, as you specified it, passes a specific property (i.e. environment variable) into the ant call to be executed.

In order to do what you are trying to do, you probably need to use the ant exec task and invoke ant that way.

@see http://ant.apache.org/manual/CoreTasks/exec.html
 
Daniel Beck
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I solved it using the exec file, but I find that very ugly. Is it not possible to use <antcall>, and pass the parameters as Properties ?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic