My builds are executed successfully but the build.xml does not get saved due to some reason, the log is attached.
java.lang.UnsupportedOperationException when setting build name and injecting ENV variables in system groovy script
IIUC Jenkins refuses to serialize a custom class you create in Groovy. IMHO it's a right behavior, but you can add the class to the whitelist using "-Dhudson.remoting.ClassFilter"
Thanks oleg_nenashev allowing my custom class solves the problem. I think we can close this issue.
Ack, thanks for the update!