Closed jgsogo closed 4 years ago
It looks like the store
method escapes #
, !
, =
, and :
characters to ensure that the Properties
file is stored in a format suitable for using the load(Reader)
method.
So if you don't read this file using that Java method you are going to fail to interpret those escaped characters.
https://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#store(java.io.Writer,%20java.lang.String)
Thank you @jgsogo and @czoido for reporting and pinpointing the root cause of this issue! I created above PR. It is currently being reviewed.
Hi! There is a problem when using Conan with build Info (it may happen to other packages as well). In the Conan workflow some properties are stored in a
artifacts.properties
file and the Conan client send these properties associated with the uploaded artifacts.The problem is that the plugin is storing the properties with escaped characters, like:
I've drilled down into the code and I've found the following:
Here we are saving this file https://github.com/jfrog/jenkins-artifactory-plugin/blob/879ba6cb7b5ba14c7ff3ffb4184e4fa249744eb5/src/main/java/org/jfrog/hudson/pipeline/scripted/steps/conan/RunCommandStep.java#L120
It gets into
java/util/Properties.java
Which, in turn, converts the value of the properties:
And yes, the implementation (still in
java/util/Properties.java
) escapes some charactersSo, we end up with those characters escaped in the
artifacts.properties
file.Conan reads this file, and send the properties with those unexpected
\:
characters.