maven中可以直接引用的java系统属性和环境变量属性

一、查看命令:

1
mvn help :system

二、引用

在pom文件中通过 ${变量名}来引用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
===============================================================================
========================= Platform Properties Details =========================
===============================================================================
 
===============================================================================
System Properties
===============================================================================
 
java.runtime.name=Java(TM) SE Runtime Environment
sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_91\jre\bin
java.vm.version=25.91-b15
java.vm.vendor=Oracle Corporation
maven.multiModuleProjectDirectory=D:\tools\IntelliJIDEA15.0.2\IdeaProject2\starwifi
java.vendor.url=http://java.oracle.com/
path.separator=;
guice.disable.misplaced.annotation.check=true
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
file.encoding.pkg=sun.io
user.script=
user.country=CN
sun.java.launcher=SUN_STANDARD
sun.os.patch.level=Service Pack 1
java.vm.specification.name=Java Virtual Machine Specification
user.dir=D:\tools\IntelliJIDEA15.0.2\IdeaProject2\starwifi
java.runtime.version=1.8.0_91-b15
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_91\jre\lib\endorsed
os.arch=amd64
java.io.tmpdir=C:\Users\ADMINI~1\AppData\Local\Temp\
line.separator=
 
java.vm.specification.vendor=Oracle Corporation
user.variant=
os.name=Windows 7
classworlds.conf=D:\tools\apache-maven-3.3.9\bin\..\bin\m2.conf
sun.jnu.encoding=GBK
java.library.path=C:\Program Files\Java\jdk1.8.0_91\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\
Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_91\bin;D:\tools\apache-maven-3.3.9\bin;\C:\Windows\System32\Wbem;C:\Windows\System32\Window
sPowerShell\v1.0\;D:\tools\gradle-3.2.1\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;.
java.specification.name=Java Platform API Specification
java.class.version=52.0
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
os.version=6.1
user.home=C:\Users\Administrator
user.timezone=Asia/Shanghai
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.specification.version=1.8
file.encoding=GBK
user.name=Administrator
java.class.path=D:\tools\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar
java.vm.specification.version=1.8
sun.arch.data.model=64
java.home=C:\Program Files\Java\jdk1.8.0_91\jre
sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher help:system
java.specification.vendor=Oracle Corporation
user.language=zh
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.8.0_91
java.ext.dirs=C:\Program Files\Java\jdk1.8.0_91\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_91\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\rt.jar;C:\Program Files\Java\jdk
1.8.0_91\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jce.jar;C:\Program Files\
Java\jdk1.8.0_91\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_91\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_91\jre\classes
sun.stderr.encoding=ms936
java.vendor=Oracle Corporation
maven.home=D:\tools\apache-maven-3.3.9\bin\..
file.separator=\
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
sun.stdout.encoding=ms936
sun.desktop=windows
sun.cpu.isalist=amd64
 
===============================================================================
Environment Variables
===============================================================================
 
GRADLE_USER_HOME=E:\gradle_repository\.gradle
CLASSWORLDS_JAR="D:\tools\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar"
PSMODULEPATH=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
COMMONPROGRAMW6432=C:\Program Files\Common Files
PROGRAMW6432=C:\Program Files
WINDOWS_TRACING_LOGFILE=C:\BVTBin\Tests\installpackage\csilogfile.log
PROCESSOR_ARCHITECTURE=AMD64
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
=D:=D:\tools\IntelliJIDEA15.0.2\IdeaProject2\starwifi
FP_NO_HOST_CHECK=NO
PATH=C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_91\bin;D:\tools\apache-maven-3.3.9\bin;\C:\Wind
ows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\tools\gradle-3.2.1\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\MySQL\MySQL
Server 5.1\bin
PROGRAMDATA=C:\ProgramData
WDIR=D:\
SYSTEMROOT=C:\Windows
TMP=C:\Users\ADMINI~1\AppData\Local\Temp
PROGRAMFILES(X86)=C:\Program Files (x86)
EXEC_DIR=D:\tools\IntelliJIDEA15.0.2\IdeaProject2\starwifi
COMPUTERNAME=PC-20180423HOPQ
OS=Windows_NT
PROMPT=$P$G
MAVEN_HOME=D:\tools\apache-maven-3.3.9
WINDIR=C:\Windows
GRADLE_HOME=D:\tools\gradle-3.2.1
SYSTEMDRIVE=C:
=::=::\
COMSPEC=C:\Windows\system32\cmd.exe
=C:=C:\Users\Administrator
HOMEDRIVE=C:
LOGONSERVER=\\PC-20180423HOPQ
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
COMMONPROGRAMFILES=C:\Program Files\Common Files
PROGRAMFILES=C:\Program Files
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
NUMBER_OF_PROCESSORS=4
TEMP=C:\Users\ADMINI~1\AppData\Local\Temp
USERDOMAIN=PC-20180423HOPQ
M2_HOME=D:\tools\apache-maven-3.3.9\bin\..
HOME=C:\Users\Administrator
PROCESSOR_LEVEL=6
ERROR_CODE=0
SESSIONNAME=Console
USERNAME=Administrator
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDOWS_TRACING_FLAGS=3
PUBLIC=C:\Users\Public
PROCESSOR_REVISION=4501
USERPROFILE=C:\Users\Administrator
APPDATA=C:\Users\Administrator\AppData\Roaming
HOMEPATH=\Users\Administrator
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_91
ALLUSERSPROFILE=C:\ProgramData
MAVEN_CMD_LINE_ARGS=help:system
MAVEN_PROJECTBASEDIR=D:\tools\IntelliJIDEA15.0.2\IdeaProject2\starwifi
MAVEN_JAVA_EXE="C:\Program Files\Java\jdk1.8.0_91\bin\java.exe"

  

posted @ 2019-01-08 15:14  技术研究与问题解决  阅读(270)  评论(0编辑  收藏  举报