The problem may be happening because your URL
may contain /
which bash interprets as sed syntax, so something like https/www.google.com
ends up something like :
sed -ie 's/^target=.*/target=https/www.google.com/' url.properties
I will suggest to delimit any special characters to avoid sed
to be confused :
url=google.com
url=`echo $url | sed -e "s/\//\\\\\\\\\//g"` # delimits backslash in URL's
sed -ie "s/^target=.*/target=$url/" url.properties