I have a jenkins job using the credentials-helper and which runs perfectly fine with the underlying tool set (maven, ant).
When running the build job, ant echoproperties lists the variable twice
When switching to jenkins pipeline (declarative) the credentials binding is used the same way:
But here the variable is only available as env.mgr.target.user but not as mgr.target.user
Result is that the build job fails cause the maven/ant task running as ant does not find the property mgr.target.user
To me this seems an issue as the behavior from a Jenkins job vs. Jenkins pipeline is different.
Obviously the underling maven/ant files could be changed to use the existing variable but this is not the point as the behaviour of my jenkins job should be the same.