When I run a mvn build like mvn clean install
, I notice that in the System.getenv()
there is an entry with key MAVEN_CMD_LINE_ARGS
and name being whatever maven phases I specify (clean install
in this case). However, I cannot find any documentation on this.
当我运行像mvn clean install的mvn构建时,我注意到在System.getenv()中有一个带有密钥MAVEN_CMD_LINE_ARGS的条目,名称是我指定的任何maven阶段(在这种情况下是干净安装)。但是,我找不到任何关于此的文档。
Does anyone know where the MAVEN_CMD_LINE_ARGS
is documented? Does it always get set in System.getenv()
or could it be dependant on the OS, etc?
有谁知道MAVEN_CMD_LINE_ARGS在哪里被记录?它总是在System.getenv()中设置还是依赖于操作系统等?
1 个解决方案
#1
0
I couldn't find any documentation specific to the environmental variable, but it may be because it is assumed that a user already understands env variables. Just 'set' or 'export' the env var to whatever you use most often.
我找不到任何特定于环境变量的文档,但可能是因为假设用户已经理解了env变量。只需将env var“设置”或“导出”到您最常使用的内容即可。
Windows
视窗
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% clean package
Linux
Linux的
set MAVEN_CMD_LINE_ARGS=${MAVEN_CMD_LINE_ARGS} clean package export MAVEN_CMD_LINE_ARGS
#1
0
I couldn't find any documentation specific to the environmental variable, but it may be because it is assumed that a user already understands env variables. Just 'set' or 'export' the env var to whatever you use most often.
我找不到任何特定于环境变量的文档,但可能是因为假设用户已经理解了env变量。只需将env var“设置”或“导出”到您最常使用的内容即可。
Windows
视窗
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% clean package
Linux
Linux的
set MAVEN_CMD_LINE_ARGS=${MAVEN_CMD_LINE_ARGS} clean package export MAVEN_CMD_LINE_ARGS