Hello All,

I am new to Jenkins pipeline and recently started to use it for my project 
build.

So, from Jenkins file I am calling a method from other .groovy file which 
is simple script having some functions defined and in those functions I am 
creating antbuilder object -> "@Field AntBuilder antBuilder = new 
AntBuilder()"
But the problem is, I am not able to call any ant targets using antbuilder 
object, simply calling echo using this object like -> " antBuilder.echo 'print 
statement' "  gives *"NotSerializableException"*exception.

java.io.NotSerializableException: org.apache.tools.ant.taskdefs.Echo

        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:860)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteFields(RiverMarshaller.java:1032)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteSerializableObject(RiverMarshaller.java:988)
        at 
org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:854)


So please guide me to resolve this problem if anyone had faced this issue 
or have any idea about it.
Any help is appreciated!
Thank you very much!
Ganesh K.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2e399b89-bed9-4ac1-9bfb-fac710d7a39c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to