How to get separate log files for each module when using the maven -T option

My project structure is as follows:

Main_Proj
       - pom.xml
       - Component1
                - pom.xml
       - Component2
                - pom.xml
       - Component3
                - pom.xml

I have three independent components. I build them in parallel using the maven threading ie option mvn -T 4C install | tee log.txt.

When I issue the above command in the pom parent directory, it starts building all three components in parallel, but I end up getting a log of all the components in one file in random order, and it becomes difficult to debug in case of an error, as the number of components will increase in the future .

So, is there a way to get the log of each component separately in this case?

+4
source share

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


All Articles