我有一个powershell (v2.0)函数:
function mvn{
param(
[parameter(Position=0, ValueFromRemainingArguments=$true)]
$args
)
<# calling the realmaven.bat file here with the args #>
"$env:M2_HOME\bin\mvn.bat" $args
}
现在,我想使用前一个脚本文件中的另一个函数:
function mvn-failsafe-debug
我有一个shell脚本,我在其中包装了一个命令(mvn clean install),将输出重定向到日志文件。
#!/bin/bash
...
mvn clean install $@ | tee $logfile
echo $? # Does not show the return code of mvn clean install
现在,如果mvn clean install因错误而失败,我希望我的包装器shell脚本也会因该错误而失败。但是,由于我将所有输出都通过管道传递给tee,因此无法访问mvn clean install的返回码,因此当我随后访问$?时,返回码始终为0(因为tee成
我运行了以下命令在本地存储库中安装一个自定义jar:
mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -Dfile=<path-to-file>
但当我尝试这个:
mvn install:install-file -Dfile=E:\jarFiles\utill-1.0.jar -DlocalRepositoryPath=E:\repo
它给出了以下错误:
The artifact information is incomplete or not valid:
[ERROR] [0]
我正在尝试使用Azure应用程序服务容器来托管Azure DevOps管道代理。我已经完成了所有的工作,因为我的代理使用Desktop在本地运行得很好,但是当我将映像发布到App时,启动命令永远不会被执行。我被迫在容器中获得一个控制台,并手动运行powershell脚本,然后按预期工作。
这是我的码头文件:
FROM mcr.microsoft.com/windows/servercore:ltsc2019
RUN powershell Install-PackageProvider -Name NuGet -Force
RUN powershell Install-Module Powers
我正在尝试从命令行构建我们的web项目,但跳过了测试。我正在使用命令mvn clean install -Dmaven.test.skip=true。
当我从传统的黑白命令提示符(也称为DOS shell)运行该命令时,该命令可以工作,但当我从"Windows PowerShell“的命令运行该命令时,我得到以下错误:
[ERROR] Unknown lifecycle phase ".test.skip=true". You must specify a valid lifecycle phase or a goal in the format <plugin-