How to redirect maven antrun exec command output to stdout?

I am using Maven 3.0.3. I have this antrun task that uses the "exec" command ...

<plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>start-xvfb</id> <phase>process-test-resources</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <echo message="Starting xvfb ..." /> <exec executable="Xvfb" spawn="true" failonerror="true"> <arg value=":0.0" /> </exec> </tasks> </configuration> </execution> 

Although I can see the echo instruction in my output, I do not see any of the executables output in the standard. What can I do to redirect it to the same place the echo message is sent to?

Thanks - Dave

+4
source share
1 answer

The spawn parameter is a problem. See ant exec runtime documentation :

If you create a command, its output will not be registered ant.

Also, make sure there is no output or output property , as they redirect the output to a property or file (see this stack question) .

+8
source

Source: https://habr.com/ru/post/1384962/


All Articles