Add prefix to all artifacts

Hi,

I have a multi project model,
I want to add a prefix to all artifacts created by the sub-projects be it jar or war files

How can I define it in a single place?

subprojects {
    apply plugin: 'java'
    archivesBaseName = "prefix-${it.name}"
}