Maven publication generates invalid artifact Id repeating the group id

I’m publishing some of my subprojects to our Artifactory repository and found that the pom.xml and the generated Maven dependency contains the wrong artifactId.

Example: the script declares group = de.uvdms in the subProjects-method; the subproject is “de.uvdms.util”. So I would expect as pom result:
groupId: de.uvdms artifactId: util

but the result is rather:
groupId: de.uvdms artifactId: de.uvdms.util

In the scripts subProject method is the group declaration group = 'de.uvdms'. The publishing configuration and artifactory configuration are also defined within subProject.

What might be the problem? I do not think that I have to explicitely an artifactId.

Ok, found out I should configure the publishing task in the individual subprojects and define the artifactId there.