How to format the ant task name output to the console to include the project name?

StackOverflow https://stackoverflow.com/questions/23422217

  •  14-07-2023
  •  | 
  •  

Question

Starting to get my head around ANT. I'm setting up a module system where we have a number of sub-projects with similar structures.

The master project has a build-content target, which then calls the build-content target in each of the sub-projects, if necessary.

This results in three "build-content" messages being output to the console (and there will be more as there is at least one more sub-project to be included in the future).

Is there a parameter to format this message so it prefixes it with the project name?

Was it helpful?

Solution

Use the BigProjectLogger :

This logger is designed to make examining the logs of a big build easier, especially those run under continuous integration tools. It 
1.When entering a child project, prints its name and directory
2.When exiting a child project, prints its name
3.Includes the name of the project when printing a target
4.Omits logging the names of all targets that have no direct task output
5.Includes the build finished timestamp of the TimeStamp logger

This is useful when using <subant> to build a large project from many smaller projects -the output shows which particular project is building.

see Ant Manual Listeners & Loggers

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top