Ant results

The Ant process creates a log of messages. By default, these are shown on the terminal.

XmlLogger

To capture the Ant process log as XML data, call Ant with additional parameters:

When running within the container:

$ ant -logger org.apache.tools.ant.XmlLogger -logfile /workspace/output/ant-log.xml <target>

When using the container image with the calling script:

$ aida-s2i -xml <target>

The Ant logfile will be stored in the workspace’s output directory.

It can be transformed into a JSON representation using the XSLT file in lib/ant-log-json.xslt. This can be done via Ant as well.

Within the container:

$ ant ant-log-json

Or via the calling script:

$ aida-s2i ant-log-json

The JSON data will look like this:

{
  "time": "5 seconds", (1)
  "success": true, (2)
  "steps": [ (3)
    {
      "name": "excel-csv",
      "time": "1 second",
      "tasks": [ (4)
        {
          "name": "echo",
          "time": "0 seconds",
          "messages": [ (5)
            "Convert spreadsheets to CSV files for further processing."
          ]
        },
        {
          "name": "apply",
          "time": "1 second",
          "messages": [
            "convert /workspace/input/Optional/Humanitarian_Template (optional).xlsx -> /workspace/tmp/Humanitarian_Template (optional).csv using filter : Text - txt - csv (StarCalc):44,34,76,1",
            "Overwriting: /workspace/tmp/Humanitarian_Template (optional).csv",
            "convert /workspace/input/Optional/Location_template (optional).xlsx -> /workspace/tmp/Location_template (optional).csv using filter : Text - txt - csv (StarCalc):44,34,76,1",
            "Overwriting: /workspace/tmp/Location_template (optional).csv",
            "convert /workspace/input/Optional/Related activities_Template (optional).xlsx -> /workspace/tmp/Related activities_Template (optional).csv using filter : Text - txt - csv (StarCalc):44,34,76,1",
            "Overwriting: /workspace/tmp/Related activities_Template (optional).csv"
          ]
        }
      ]
    },

    {"...etcetera..."}
  ]
}
1 Total time of Ant process
2 Whether the Ant process ended without an error.
3 Array of steps taken (Ant targets)
4 Array of tasks within each step
5 Array of messages generated by the Ant process.
Twitter LinkedIn Github Gitlab Meetup RSS Miro Trello Zotero Hypothesis