Copying of files from dependant war file is not working on Jenkins

We have common resources in a separate war file, common-web.war, which are shared accross war files in multiple applications. The resources are copied using from - into construct as
below. The issue is that files are copied in to destination war file when build is run locally. However copying of files is not working on Jenkins.

configurations {
	commonWebResources {
		description = "common web resources"

dependencies {
    runtime commonWebResources( group: '', name: 'common-web', version:'1.0.4-SNAPSHOT')

war {
	archiveName = 'xxx-web.war'
	from (zipTree(configurations.commonWebResources.singleFile)) {
		exclude '*/web.xml'
		exclude '**/config/app/*.xml'

Are you receiving an error or are the files simply missing? Are local builds and CI builds pointing to the same repositories?