Home > Mobile >  How to access the console output of invoker integration test in post-build script?
How to access the console output of invoker integration test in post-build script?

Time:11-17

I have a post-build script written in Groovy in my maven-invoker-plugin setup. How can I access the console output of an integration test in this script? I want to check that certain text has been printed.

CodePudding user response:

I think this is the property you are looking for:

https://github.com/apache/maven-invoker-plugin/blob/master/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L147

Property: invoker.streamLogs
Default value: false
Description: Flag used to determine whether the build logs should be output to the normal mojo log.

See this method for how logging is handled:

https://github.com/apache/maven-invoker-plugin/blob/master/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java#L2226

CodePudding user response:

The entire log is stored into the build.log file, which is placed in the logDirectory.

  • Related