function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Randy SchultzRandy Schultz 

ant deploy error username cannot be empty

The build.xml seems to completely ingore that a properties file esists. What is missing. The build and properties files are siblings. The setting of the param is  sf.username = justme@curious-otter-myorg.com
no qoutes, space after the equals sign, (terribly fommated file it should be a standard). It would be nice to know the requirements of where these two file need to be stored in relation to the package.xml adn the call to the ant tool.
Randy SchultzRandy Schultz
I found the issue. It was the encoding on the text file; since I generate it at build time by passing in an encoded pasword to a powershell script during a TFS build that then creates that file.
param($a, $b)
Write-Host " set the user and password "
Write-Host " User " $a
$file = "deploy\build.properties"
if (-not(Test-Path "deploy")){
Write-Host " deploy folder not found"
return
}
$Msg = @()
$Msg +="sf.username =$a"
$Msg +="sf.password =$b"
$Msg +="sf.serverurl =https://login.salesforce.com"
$Msg +="sf.maxPoll =20"
$Msg  | Out-File -Encoding ASCII $file