How to handle ':' in a proeperty

Hi i would like to specify the URL using parameter. So i wrote this task:
task setURL << {
println myUrl
Properties props = new Properties()
File propsFile = new File(’./resources/testprop/framework.properties’)
props.load(propsFile.newDataInputStream())
props.setProperty(‘URL’, myUrl)
props.store(propsFile.newWriter(), null)
}
but when i am calling task:
gradle -q setURL -PmyUrl=https://10.11.3.10:8443/somepath

in the property file it is getting as
URL=https://10.11.3.10:8443/somepath

how can i avoid ‘’ char just before ‘:’ ?

Have you checked if your file works? Java is escaping : because it should be escaped in Java properties files.

1 Like

Thanks Adrian … yes the file worked!