I usually modify scripts like mvn.bat and ant.bat to display the command line invoked:
set command=%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath...
This way, when Maven starts I see the following:
["c:\Winny\java\jdk1.6.0_13\bin\java.exe" -Xms512m -Xmx512m -XX:MaxPermSize=150m -classpath "c:\Winny\java\apache-maven-2.1.0\bin\..\boot\c
lassworlds-1.1.jar" "-Dclassworlds.conf=c:\Winny\java\apache-maven-2.1.0\bin\..\bin\m2.conf" "-Dmaven.home=c:\Winny\java\apache-maven-2.1.0
\bin\.." org.codehaus.classworlds.Launcher clean install -Pproducts -DBUILD_NUMBER=11111]
An exact command line that was run - with all JVM arguments and classpaths.
I also see which JVM was used and where Maven was installed (and of what version) from looking on this line.
Can TeamCity do the same ? I mean to display the full command line that was invoked.
That would be great for seeing exactly what was run by it.