我已经在构建机器上安装了Maven,并且mvn --version
运行正常。但是,通过远程PSSession调用时会发生以下错误:
PS C:\Users\User1> Enter-PSSession -ComputerName remotehost.domain -Credential $cred
[remotehost.domain]: PS C:\Users\User2> mvn --version
Error occurred during initialization of VM
Could not reserve enough space for object heap
我怀疑未为PSSession加载某些用户环境变量并导致了问题?需要注意的是,如果未明确指定svn凭据,“ svn更新”也将失败。 Maven通过远程会话是否需要类似的配置?