Using Java to copy Build Engine including the password through IBuildEngine
I am trying to copy an existing Build Engine to be used with a new Build Definition. Making a copy does not duplicate the password used in the Build Agent Connection. How do I get the password and copy it over? I am not able to see any properties in the Build Engine via IBuildEngine.getProperties()
List<IBuildEngine> buildEngines = fetchResult.getRetrievedItems(); for (IBuildEngine buildEngine : buildEngines) { System.out.println("BuildEngine=" + buildEngine.getId()); IBuildProperty[] buildEngineProperties = (IBuildProperty[]) buildEngine.getProperties().toArray(); for (int j = 0; j < buildEngineProperties.length; j++) { String propName = buildEngineProperties[j].getName(); String propValue = buildEngineProperties[j].getValue(); System.out.println(propName + "=" + propValue); } }
RTC 6.0.2, JRE 1.8