Display an exact command line invoked

I usually modify scripts like mvn.bat and ant.bat to display the command line invoked:

set command=%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath...
echo [%command%]
%command%


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.

2 comments
Comment actions Permalink

Hello Evgeny,

You can find the full command line of the build in teamcity-agent.log.
Prior to 4.0 TeamCity displayed command strings in the build log.
However some users complained that they don't want to see it in there because
it may reveal security sensitive data like passwords, credentials, etc. So
in 4.0 it was disabled.

We're going to return command lines back to build logs, but make it configurable.

I usually modify scripts like mvn.bat and ant.bat to display the
command line invoked:

set command=%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath...
*echo
%command%*
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.con
f" "-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.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5234367#5234367

--
Sergey Anchipolevsky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Ok, I see it. Thank you !

0

Please sign in to leave a comment.