def workSpace = WORKSPACE
def outPath = workSpace+"\\installation\\FragmentOutput.wxs"
powershell """
Set-Location ${workspace}
$wixTool = Get-ChildItem C:\\tools\\ | where { $_.PSIsContainer -and $_.Name -like "WiX.Toolset.UnofficialFork*" } | Sort CreationTime -Descending | Select -First 1 | Select FullName
Write-Output $wixTool
$wixPath = $wixTool.FullName
Write-Output $wixPath
$wixPath\\tools\\wix\\heat dir ${workSpace}\\deploy -nologo -ag -cg fragmentComponentRefGroup -dr INSTALLLOCATION -gg -sfrag -sreg -suid -scom -srd -sw1076 -var var.SourceFilesDir -out ${outPath}
"""
上面的是groovy文件中的powershell代码。詹金斯在执行上述代码时抛出了以下错误。 groovy.lang.MissingPropertyException:无此类属性:wixTool用于类:
任何帮助将不胜感激。