简体   繁体   中英

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

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.

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

整个日志存储在build.log文件中,该文件位于logDirectory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM