Cannot configure the 'publishing' extension after it has been accessed - IVY

Hi all,

I am using the ivy publish plugin with below publishing code for uploading war package to artifactory. But , I am getting the error as “Cannot configure the ‘publishing’ extension after it has been accessed -”…Any help is highly appreciated.

publishing {
publications {
ivy(IvyPublication) {
organisation 'com.homedepot.sa.pt.pos’
from components.web // war file
}
}
repositories {
ivy {
url “http://artifactory.homedepot.com//libs-release-local
}
}
}

The error must be somewhere else before this point in your buildscript, maybe in an applied plugin. Some piece of code already accessed the publishing extension.

thanks for the reply…