How can I access the name of the system user (which eclipse also uses for the javadoc author tag) in my ant build file?
I'm trying to show some information about the current program version in my java application. I decided to use jreleaseinfo which passes variables from my ant build script to my java classes (to show them in a window). With svnant I'm even capable of accessing the latest revision number and build date from svn within my build.xml.
Now: The last thing I need is to show who made that build!
This will work anywhere. It uses the java system property user.name.
<property environment="env" />
<echo message="user: ${user.name}" />
user.name
can be used:
<echo>User is: ${user.name}</echo>
Results in:
[echo] User is: coobird
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With