Gradle build creating jar more than twice error on jenkins

I have a multi module project which is depending on 4 sub projects(jars), subproject b depends on a, c depends on b and d depends on c. finallay build depends on all 4 subprojects and creates war file.
when I build this projects on jenkins it says that sub projects are created twice and jenkins project is unable to publish the jar into artifactory.