Publishing multiple non java artifacts

Hi,

I have a use case where I need to publish multiple non java artifacts to maven central repository. In my java project, I have some folders like A, B, C… and the number of these folders is not fixed. I need to create a zip for each folder and publish the each zip as an artifact.

I am able to create the zip files and I tried

artifacts{
archive zip
}
in a loop but it is taking only one name per the artifacts and throwing the below error
A POM cannot have multiple artifacts with the same type and classifier. Already have MavenArtifact .

I don’t want to give the classifier because it gets appended to the file name.

Is it possibel to create dynamic configurations and uploadArchives? Please suggest me how to handle this usecase.