• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

automatically echo project name for each task

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

We have a toplevel build.xml that essentially calls other projects' build.xml files. And this works just fine. However for each target that ant automatically prints out, I can't tell which project's build.xml it came from. Below I have the following (sample) build.xml for each project. This produces output like:



I like the output that the echo statement does; however, it is unmaintainable/error-prone to have to put the echo statement in each task.

Is there an easier way? Any help would be appreciated.

We're using Ant version: 1.8.1

Thanks,
Jim

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used a naming convention for targets whereby each target was prefixed with some letters to identify the xml file. For example, in the global included xml file all targets started with "g_". But having the option to have Ant print something like "[targetx in foo.xml]" seems like a worthwhile enhancement to Ant.
 
Are you here to take over the surface world? Because this tiny ad will stop you!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic