20

Is there any maven property to get the user name of the user that runs maven (windows and linux)?

Ralph
  • 118,862
  • 56
  • 287
  • 383

1 Answers1

40

You can just use System Properties, here's the Overview of standard Properties.

In your case, user.name is what you want, use the ${} syntax:

<someProperty>
${user.name}
</someProperty>
Sean Patrick Floyd
  • 292,901
  • 67
  • 465
  • 588
  • Works very well ... e. g. Windows 10 with maven SCM cvs native client (analog CVS-NT) `scm:cvs:pserver:${user.name}@cvs-server-host-name:/cvs-repository` [CVS-Native cvs-1-11-22] Client](http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/) – udoline Jul 19 '19 at 05:26
  • Somethink about the SCM-Maven-Plugin [SCM CVS HowTo] (https://maven.apache.org/scm/cvs.html) – udoline Jul 19 '19 at 05:39